/* BLOC · Précision V2. Loaded after app.css and evolution.css.
   The palette and all application states remain owned by app.css. */
@font-face {
  font-family: "BLOC Manrope";
  src: url("./fonts/manrope-v2.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --body: "BLOC Manrope", Arial, sans-serif;
  --display: "BLOC Manrope", Arial, sans-serif;
  --type-body: 1rem;
  --type-action: .9375rem;
  --type-label: .875rem;
  --type-small: .8125rem;
  --radius-control: 10px;
  --radius-card: 12px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --tap-size: 44px;
}

body { letter-spacing: -.012em; }
h1, h2, h3 { letter-spacing: -.035em; }
h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.12; }
h2 { font-size: 1.35rem; line-height: 1.25; }
h3 { line-height: 1.35; }
small, .small, .eyebrow, .footer-note, .tag { font-size: .8125rem; line-height: 1.5; }
.eyebrow { letter-spacing: .015em; font-weight: 650; }
.muted, small { color: var(--muted); }
.num, .num-lg { font-variant-numeric: tabular-nums lining-nums; }

/* One shape language. Light rules separate entries; blue identifies the active action. */
.btn { min-height: 48px; min-width: var(--tap-size); border-radius: var(--radius-control); padding: 11px 16px; font-size: var(--type-action); font-weight: 700; box-shadow: none; }
.btn:active:not(:disabled) { transform: none; }
.btn.secondary { background: var(--surface); border: 1px solid var(--control-border); color: var(--text); }
.btn.ghost { background: transparent; border: 1px solid transparent; color: var(--accent); }
.btn.text-btn { min-width: var(--tap-size); font-size: var(--type-label); min-height: 44px; padding: 9px 2px; }
.icon-btn { width: 44px; min-width: 44px; height: 44px; border-radius: 9px; }
.notice, .network-banner { border-radius: var(--radius-card); padding: var(--space-md); font-size: var(--type-label); line-height: 1.55; }
.notice p, .notice .small { font-size: .875rem; }
.bordered, .pg-card { border-radius: var(--radius-card); }
.empty-state { border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--space-lg); background: var(--surface); }
.form-error { border-radius: var(--radius-control); font-size: var(--type-label); }
[aria-invalid="true"], input:user-invalid, select:user-invalid { border-color:var(--danger)!important; }
.field-error, .field .field-error { color:var(--danger); font-size:var(--type-label); font-weight:650; line-height:1.5; }
summary { min-height: var(--tap-size); padding-block: 11px; cursor: pointer; overflow-wrap: anywhere; }
input, select, textarea { scroll-margin-block: 18px 90px; }
.sheet-content { scroll-padding-block: 16px 90px; }
.sheet-heading>div { min-width: 0; }
.sheet-heading h2 { overflow-wrap: anywhere; }
.sheet-heading .icon-btn { flex-shrink: 0; }
label.btn:has(+input:focus-visible) { outline:2px solid var(--focus); outline-offset:4px; }
/* Only a very short window drops the sticky action; with the keyboard open it stays reachable above it (U-12). */
@media(max-height:359px) {
  .sheet .form-footer, .sheet .session-start-submit, .workout-focus .validate-bar { position:static; bottom:auto; margin-bottom:0; }
  .workout-focus .workout-rest { position:static; }
}
html[data-compact-viewport="true"] .sheet .form-footer,
html[data-compact-viewport="true"] .sheet .session-start-submit { position:sticky; bottom:0; margin-bottom:0; }
html[data-compact-viewport="true"] .workout-focus .validate-bar { bottom:var(--keyboard-bottom,0px); }
html[data-compact-viewport="true"] .workout-focus .workout-rest { position:static; bottom:auto; margin-bottom:0; }
html[data-compact-viewport="true"] .sheet-content { scroll-padding-block-end:16px; }
html[data-compact-viewport="true"] :is(input,select,textarea) { scroll-margin-block-end:16px; }
html[data-compact-viewport="true"] .sheet[open] { display:block; overflow-y:auto; overscroll-behavior:contain; scroll-padding-block:16px; }
html[data-compact-viewport="true"] .sheet-content { overflow:visible; }
.tag { border-radius: 6px; padding: 4px 8px; }
.tabs { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; padding: 0; gap: 12px; }
.tab { border-radius: 0; border-bottom: 2px solid transparent; flex: 0 0 auto; min-height: 44px; padding: 10px 4px; font-size: .875rem; }
.tab[aria-selected="true"] { border-color: var(--accent-fill); background: transparent; box-shadow: none; color: var(--accent); }
.section-heading h2 { font-size: 1.125rem; }
.page-top { margin: 16px 0 21px; }
.page-top h1 { font-size: clamp(2rem, 5vw, 2.7rem); }
.route-nutrition .page-top { flex-wrap: wrap; }
.route-nutrition .page-top > div { flex: 0 0 auto; }
.route-nutrition .page-top h1 { white-space: nowrap; overflow-wrap: normal; }
.route-nutrition .page-top > .btn { margin-left: auto; }

/* Shell and navigation, including all four product routes. */
.content { max-width: 660px; }
.masthead { height: 70px; }
.masthead-actions>.icon-btn { border: 1px solid var(--border); box-shadow: none; }
.saved-pill[data-action] { min-height: 44px; font-size: .8125rem; line-height: 1.3; }
.bottom-nav { border-radius: 0; box-shadow: none; background: var(--nav); }
.bottom-nav .nav-link { border-radius: 0; font-size: .8125rem; min-height: 54px; }
.bottom-nav .nav-link>span:last-child { font-size: .8125rem; }
.bottom-nav .nav-link.active { color: var(--accent); background: transparent; font-weight: 750; }
.bottom-nav .nav-link.active:after { display: block; top: -5px; width: 28px; height: 2px; }
.sidebar-caption, .sidebar-bottom>p, .sidebar-bottom>.mark { display: none; }
.sidebar-bottom .btn { font-size: .8125rem; }

/* Today: an active session is a useful status, not a cover illustration. */
.week-rail { margin-bottom: 18px; }
.week-day { border-radius: 7px; min-height: 58px; }
.week-day>span { font-size: .8125rem; }
.week-day strong { font-size: 1.125rem; }
.today-dateline time, .today-dateline .eyebrow { font-size: .8125rem; }
.today-dateline .block-link { min-height: 44px; border-radius: 7px; font-size: .8125rem; }
.today-layout { gap: 22px; }
.today-layout>.hero { position: relative; top: auto; }
.hero-cta { border-radius: 8px; min-height: 52px; padding: 10px 16px; font-size: .875rem; }
.hero-cta>svg { background: transparent; color: inherit; border-radius: 0; padding: 0; width: 20px; height: 20px; }
.today-ledger { min-width: 0; }
.week-facts strong { font-size: 1.625rem; }
.week-facts span { font-size: .8125rem; }
.next-session-cards .plan-card { padding: 17px 0; }
.next-session-cards .plan-card p { font-size: .8125rem; }
.today-next-card { min-width: 0; margin-top: 21px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.today-next-card .section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 0 0 9px; }
.today-next-card .section-heading h2 { margin: 0; font-size: 1.0625rem; }
.today-next-card .section-heading span { font-size: .8125rem; }
.today-next-card p { font-size: .875rem; line-height: 1.55; color: var(--muted); }
.today-next-card .btn { margin-top: 12px; min-height: 44px; }
.today-next-name { font-weight: 700; color: var(--text)!important; }
.today-next-comparison { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 13px 0; padding: 12px 0; border-block: 1px solid var(--border); }
.today-next-comparison>div { min-width: 0; }
.today-next-comparison small, .today-next-comparison strong { display: block; font-size: .8125rem; line-height: 1.4; overflow-wrap: anywhere; }
.today-next-comparison strong { margin-top: 4px; font-size: 1rem; color: var(--text); }

/* Workout: keep the comparable result in sight, then the live editor. */
.workout-shell { background: var(--bg); }
.workout-content { max-width: 820px!important; }
.workout-focus { padding-top: 6px; }
.workout-focus-head { margin-bottom: 10px; }
.focus-back, .focus-menu { min-height: 44px; font-size: .8125rem; }
.workout-heading { padding: 8px 0 14px; }
.workout-heading h1 { font-size: clamp(1.85rem, 6vw, 2.7rem); line-height: 1.1; letter-spacing: -.045em; }
.set-chip { min-width: 76px; min-height: 56px; border-radius: 7px; padding: 8px 10px; }
.set-chip span, .set-chip strong { font-size: .8125rem; letter-spacing: 0; }
.set-chip.pending { opacity: 1; }
.set-chip.current { border-width: 1px; box-shadow: inset 0 -3px var(--accent); }
.workout-target { padding: 13px 14px; }
.workout-target>span, .workout-target small { font-size: .8125rem; line-height: 1.45; }
.workout-target strong { font-size: .9375rem; line-height: 1.4; }
.workout-control-label, .workout-control>small, .workout-unit>span, .rir-control small, .workout-set-form .small { font-size: .8125rem; line-height: 1.45; }
.workout-equipment-suggestion { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--selected); }
.workout-equipment-suggestion p { min-width: 0; }
.workout-equipment-suggestion span, .workout-equipment-suggestion strong { display: block; font-size: .8125rem; line-height: 1.45; overflow-wrap: anywhere; }
.workout-equipment-suggestion strong { margin-top: 3px; color: var(--text); font-size: .9375rem; }
.workout-equipment-suggestion .btn { min-height: 44px; max-width: 245px; white-space: normal; line-height: 1.35; }
.workout-context-caution, .workout-context-source { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--selected); color: var(--text); font-size: .8125rem; line-height: 1.5; }
.workout-context-source { border-color: var(--border); background: var(--surface-2); }
.workout-stepper { border-radius: 8px; min-height: 70px; grid-template-columns: 48px minmax(0,1fr) 48px; }
.stepper-button { min-width: 44px; min-height: 48px; font-size: .9375rem; background: var(--surface); border-inline: 1px solid var(--border); }
.stepper-value input { font-size: 2rem!important; letter-spacing: -.045em; }
.stepper-value span { font-size: .8125rem; }
.segmented.compact { border-radius: 8px; gap: 4px; }
.segmented.compact .segment { border-radius: 6px; font-size: .8125rem; min-height: 44px; }
.rir-control { margin-top: 15px; }
.rir-picker { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
.rir-choice { min-height: 44px; min-width: 44px; border-radius: 7px; font-size: .875rem; }
.route-workout .active-validate { border-radius: 8px; min-height: 54px; font-size: .9375rem; }
.workout-notes, .workout-notes summary, .workout-notes p { font-size: .8125rem; }

/* Rest and transitions communicate the next step without competing accents. */
.workout-rest { border-radius: 10px; box-shadow: none; padding: 17px 19px; }
.workout-rest .eyebrow, .workout-rest .timer-status,
.rest-next span, .rest-next strong { font-size: .8125rem; }
.workout-rest .timer-value { font-size: clamp(3.4rem, 15vw, 4.6rem); }
.workout-rest .text-btn, .workout-rest .rest-undo { font-size: .8125rem; min-height: 44px; }
.workout-rest .rest-controls .btn { min-height: 44px; border-radius: 7px; font-size: .8125rem; }
.workout-rest .rest-ready { min-height: 50px; border-radius: 7px; font-size: .875rem; }
.runtime-decision, .route-workout .notice.attention { border: 1px solid var(--border); border-radius: 9px; background: var(--surface); padding: 18px; }
.runtime-decision p, .route-workout .notice.attention p { font-size: .875rem; line-height: 1.55; }
.runtime-decision .btn, .route-workout .notice.attention .btn { min-height: 46px; }
.workout-menu-item>span, .workout-menu-item strong, .workout-menu-item small { font-size: .8125rem; }
.duration-presets .btn { min-height: 44px; font-size: .8125rem; }

/* Nutrition: direct actions before the day summary, then a compact editable log. */
.date-strip { border-radius: 8px; margin-bottom: 15px; }
.date-strip .icon-btn { width: 44px; min-width: 44px; }
.date-strip .icon-btn:disabled { opacity: .38; cursor: default; }
.date-control { min-height: 44px; font-size: .8125rem; }
.date-control>span { font-size: .8125rem; }
.nutrition-summary>.energy-board { border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); padding: 17px 18px; margin: 0; }
.energy-board-title { font-size: .8125rem; margin-bottom: 4px; }
.energy-main { gap: 10px; margin: 2px 0 4px; }
.energy-main>.num-lg { font-size: clamp(2.65rem, 10vw, 3.65rem); letter-spacing: -.055em; }
.energy-main>.num-lg.long { font-size: 2.7rem; }
.energy-target, .energy-board>.energy-caption, .nutrition-summary>.energy-caption { font-size: .8125rem; line-height: 1.45; color: var(--muted); opacity: 1; }
.energy-board .meter { background: var(--surface-2); margin-top: 12px; }
.energy-board .meter>span { background: var(--accent-fill); }
.nutrition-panel .macro-row { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 7px 0; }
.nutrition-panel .macro-label { font-size: .8125rem; font-weight: 650; gap: 0; }
.nutrition-panel .macro-label>b { display: none; }
.nutrition-panel .macro-value { text-align: left; font-size: 1.0625rem; line-height: 1.2; font-weight: 700; }
.nutrition-panel .macro-value small { display: block; font-size: .8125rem; font-weight: 500; }
.nutrition-panel .macro-value .macro-missing { display: none; }
.nutrition-panel .macro-row>.macro-missing { font-size: .8125rem; line-height: 1.4; }
.nutrition-panel>.btn-row .btn { font-size: .8125rem; min-height: 44px; }
.nutrition-meals { margin-top: 18px; }
.meal { padding: 17px 0; }
.meal-heading { margin-bottom: 10px; }
.meal-heading :is(h2,h3) { font-size: 1.125rem; }
.meal-heading small, .food-entry small, .entry-main small,
.entry-energy small, .meal>.btn-row .btn { font-size: .8125rem; line-height: 1.45; }
.food-entry { padding: 11px 0; gap: 10px; }
.food-entry .food-name { font-size: .875rem; font-weight: 700; }
.entry-energy { color: var(--text); font-size: 1rem; font-weight: 700; }
.precision-entry-edit { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; min-width: 44px; min-height: 48px; border: 0; border-radius: 0; background: transparent; color: var(--text); font-size: 1rem; text-align: right; font-weight: 700; }
.food-entry .precision-entry-edit { flex: 0 0 auto; width: auto; padding: 6px 0 6px 7px; text-align: right; cursor: pointer; }
.food-entry .precision-entry-edit small { font-size: .8125rem; font-weight: 500; color: var(--muted); }
.nutrition-quick { margin-bottom: 0; padding-bottom: 15px; }
.picker-heading h2 { font-size: 1.0625rem; }
.picker-heading>span, .nutrition-quick-item strong, .nutrition-quick-item span, .nutrition-quick-item b { font-size: .8125rem; }
.nutrition-quick-item { min-height: 78px; border-radius: 8px; }
.route-nutrition .nutrition-toolbar { position: static; inset: auto; margin: 0 0 10px; padding: 0; max-width: 100%; }
.route-nutrition .nutrition-toolbar .btn { min-height: 54px; justify-content: center; gap: 9px; background: var(--accent-fill); border: 1px solid var(--accent); color: var(--on-accent); box-shadow: none; }

/* The eight trays are scan-friendly rows on a phone, with a full photo on detail. */
.prep-collection, .prep-detail, .food-list-item { border-radius: 9px; }
.prep-collection-copy>strong { font-size: 1.125rem; }
.prep-collection-copy>span:last-child, .prep-eyebrow,
.prep-menu-intro>span, .prep-context, .prep-catalog-note { font-size: .8125rem; }
.prep-menu-intro p { font-size: 1.25rem; }
.prep-context { border-radius: 6px; }
.prep-card { border-radius: 8px; box-shadow: none; }
.prep-card:hover { transform: none; }
.prep-card-body { padding: 12px; }
.prep-card-title { font-size: .875rem; line-height: 1.4; }
.prep-card-reference, .prep-macros strong, .prep-macros small, .prep-card-choose { font-size: .8125rem; }
.prep-macros { gap: 7px; }
.prep-card-choose { min-height: 44px; padding-top: 7px; }
.prep-card-energy { border-radius: 5px; box-shadow: none; font-size: .875rem; }
.prep-card-energy small { font-size: .8125rem; }
.prep-detail-energy>strong { font-size: 1.625rem; }
.prep-detail-energy small, .prep-detail-energy>span,
.prep-detail .prep-macros strong, .prep-detail .prep-macros small,
.prep-quantity-title, .prep-quantities button,
.prep-total, .prep-save-note { font-size: .8125rem; }
.prep-quantities button { min-height: 44px; border-radius: 7px; }
.prep-total { border-radius: 8px; }

/* Program, history, progress and forms share the same reading scale. */
.calendar-day, .history-filters, .chart-wrap, .graph-data, .form-live-total, .summary-note { border-radius: 9px; }
.day-label, .plan-card p:not(.day-label), .exercise-body>p, .calendar-body p, .program-modebar p, .program-modebar>.btn, .program-modebar strong, .history-item, .history-item p, .history-item small, .results-caption, .history-filters summary, .recommendation-heading h3, .recommendation-heading .tag, .recommendation-compare small, .recommendation-compare span, .recommendation-details summary, .recommendation-details p, .recommendation-missing summary, .reference-row strong, .reference-row small, .reference-row .btn, .record-row small, .set-history-row small, .proposal p, .week-bar, .week-bar-label, .legend, .chart .axis, .graph-data summary, .weekly-fact p, .week-facts span { font-size: .8125rem; line-height: 1.5; }
.plan-card, .exercise-row { padding-block: 17px; }
.plan-card .btn, .program-modebar>.btn, .period-control button, .plan-actions>summary { min-height: 44px; font-size: .8125rem; }
.plan-card :is(h2,h3), .calendar-body :is(h2,h3) { font-size: 1.0625rem; }
.exercise-row h3 { font-size: 1rem; }
.exercise-body .rx-values { color: var(--text); }
.day-index, .exercise-index { border-radius: 6px; }
.calendar-day { border: 1px solid var(--border); background: var(--surface); }
.history-item { min-height: 72px; padding: 15px 0; }
.history-item :is(h2,h3) { font-size: 1.125rem; }
.history-filters { padding: 15px; }
.progress-filter, .period-control { gap: 9px; }
.period-control button { border-radius: 7px; }
.period-control button[aria-pressed="true"] { background: var(--selected); border-color: var(--accent-fill); color: var(--accent); }
.chart-wrap { border: 1px solid var(--border); }
.legend { justify-content: flex-start; gap: 14px; }
.weekly-fact .num { font-size: 2.1875rem; }
.data-table summary, .graph-data summary, .plan-actions>summary, .workout-notes summary { min-height: 44px; cursor: pointer; }

/* Progression explanation: every point visible, grouped under plain headings. */
.progression-explain { margin: 14px 0 4px; }
.progression-explain .explain-summary { color: var(--text); font-size: .875rem; font-weight: 700; line-height: 1.5; }
.progression-explain .explain-note { margin-top: 4px; }
.explain-group { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 10px; }
.explain-group h4 { margin: 0; font-size: .8125rem; font-weight: 700; line-height: 1.5; color: var(--text); }
.explain-group ul { margin: 4px 0 0; padding-left: 18px; }
.explain-group li { margin: 4px 0; font-size: .8125rem; line-height: 1.5; }
.explain-group .explain-sets { margin: 2px 0 0; padding-left: 0; list-style: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.explain-group .explain-sets li { margin: 1px 0; }
.explain-defaults h4, .explain-defaults li { color: var(--muted); }
.explain-actions { display: flex; flex-wrap: wrap; gap: 0 16px; }

/* Dialogs, authentication, and saving feedback. */
.sheet { border-radius: 13px 13px 0 0; box-shadow: 0 -14px 60px #10226328; }
.sheet-handle { display: none; }
.sheet-heading { padding: 18px 21px; }
.sheet-heading .eyebrow { }
.sheet-heading h2 { font-size: 1.4375rem; line-height: 1.2; }
.sheet-content { padding: 20px 21px calc(24px + var(--safe-bottom)); }
.sheet-content .small, .sheet-content small,
.sheet-content .field>span, .sheet-content .field small,
.sheet-content .checkbox small, .sheet-content .notice,
.form-subtitle, .form-error, .form-live-total,
.settings-copy small,
.quantity-label, .quantity-block>small,
.consume-food-summary>small, .repeat-meal-card small,
.food-list-item small { font-size: .8125rem; line-height: 1.5; }
.field input, .field select, .field textarea { border-radius: var(--radius-control); min-height: 48px; background: var(--surface); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 2px; }
.sheet form[data-form="quick-calories"] .form-grid.triple { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 10px; }
.sheet form[data-form="quick-calories"] .form-grid.triple .field>span { font-size: .8125rem; line-height: 1.4; min-height: 20px; }
.sheet form[data-form="quick-calories"] .form-grid.triple .field input { min-width: 0; padding: 12px; font-size: 1rem; }
.sheet form[data-form="quick-calories"] .form-grid.triple .field:nth-child(3) { grid-column: 1/-1; }
.sheet .form-footer { border-top: 1px solid var(--border); }
.form-footer .btn { min-height: 52px; font-size: .875rem; }
.settings-link strong { font-size: .875rem; font-weight: 700; }
.toast { border-radius: var(--radius-control); font-size: var(--type-label); }
.auth-page { max-width: 680px; }
.auth-page>h1, .auth-frame>h1 { font-size: clamp(2.15rem, 6vw, 2.8rem); }
.auth-page>.eyebrow, .auth-frame>.eyebrow, .auth-lead { font-size: .875rem; }
.auth-brand { font-weight: 800; }
.auth-footer { margin-top: 24px; padding: 0; font-size: .8125rem; line-height: 1.45; }
.auth-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-underline-offset: 3px; }
.auth-page--login { max-width: none; display: grid; place-items: center; padding: 30px 20px max(30px,env(safe-area-inset-bottom)); }
.auth-frame { width: min(100%, 510px); padding: clamp(28px,4vw,42px); border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.auth-frame .auth-brand { gap: 13px; font-size: 3rem; }
.auth-frame .auth-brand img { width: 48px; height: 48px; border-radius: 12px; }
.auth-frame>.eyebrow { margin: 28px 0 10px; color: var(--muted); font-weight: 700; }
.auth-frame>h1 { margin-bottom: 12px; }
.auth-frame>.auth-lead { margin-bottom: 27px; line-height: 1.55; }
.auth-frame form { margin-top: 0; }
.auth-frame .stack { gap: 15px; }
.auth-frame .field input { min-height: 50px; font-size: 1rem; }
.auth-frame .btn.primary { min-height: 50px; }
.auth-frame>.small.spaced { margin-top: 19px; font-size: .8125rem; line-height: 1.55; }
.auth-frame details.bordered { margin-top: 18px; padding: 0; border: 0; border-block: 1px solid var(--border); }
.auth-frame details summary { min-height: 48px; padding: 13px 2px; font-size: .875rem; line-height: 1.45; }
.auth-frame details p { padding: 0 2px 15px; font-size: .8125rem; line-height: 1.55; color: var(--muted); }
.auth-frame details a { color: var(--accent); text-underline-offset: 3px; }

@media (max-width: 759px) {
  .auth-page--login { display: block; padding: 34px 20px max(28px,env(safe-area-inset-bottom)); }
  .auth-frame { max-width: 500px; margin: 0 auto; padding: 0; border: 0; border-radius: 0; background: transparent; }
  .content { padding: 0 20px calc(92px + var(--safe-bottom)); }
  .masthead { min-height: 66px; padding: 10px 0; }
  .brand-caption { display: none; }
  .bottom-nav { position: fixed; inset: auto 0 0; max-width: none; min-height: calc(65px + var(--safe-bottom)); padding: 4px 8px max(5px, var(--safe-bottom)); border-width: 1px 0 0; }
  .bottom-nav .nav-link { min-height: 54px; }
  .workout-content { padding: 0 17px calc(35px + env(safe-area-inset-bottom))!important; }
  .workout-focus { padding-bottom: 35px; }
  .workout-focus:has(.validate-bar) { padding-bottom:calc(100px + var(--safe-bottom)); }
  .workout-target { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: 2px 9px; padding: 9px 12px; }
  .workout-target>span { grid-column: 1 / -1; margin: 0; }
  .workout-target>strong { grid-column: 1; }
  .workout-target>small { grid-column: 2; text-align: right; }
  /* Validation follows load, repetitions, RIR and technique, including when the keyboard is open. */
  body:has(.route-workout .active-validate)::after { display: none; }
  .route-workout .active-validate { position: static; inset: auto; width: 100%; max-width: none; margin: 22px 0 0; box-shadow: none; }
  .nutrition-desktop { display: flex; flex-direction: column; gap: 0; }
  .nutrition-panel { display: contents; }
  .nutrition-panel>.nutrition-summary { order: 0; }
  .nutrition-panel>.btn-row { order: 0; margin: 12px 0 0; }
  .nutrition-meals { order: 1; }
  .nutrition-summary>.energy-board { padding: 12px 15px; }
  .nutrition-summary .energy-main>.num-lg { font-size: 2.625rem; }
  .nutrition-panel .macro-row { padding: 5px 0; border-bottom: 0; }
  .nutrition-summary>.energy-caption { margin: 3px 0 12px; }
  body:has(.route-nutrition .nutrition-toolbar)::after { display: none; }
  .content:has(.nutrition-toolbar) { padding-bottom: calc(88px + var(--safe-bottom)); }
  .sheet { max-height: calc(var(--vvh,100dvh) - 8px); }
  /* Nutrition entry forms remain scrollable with a compact visual viewport and keyboard. */
  .sheet:has(form[data-input="food-calc"], form[data-input="quick-food-calc"]) .form-footer {
    position: static;
    bottom: auto;
    margin: 18px 0 0;
    padding: 14px 0 max(24px,var(--safe-bottom));
  }
  .prep-grid { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .prep-card { display: grid; grid-template-columns: 96px minmax(0,1fr); align-items: stretch; min-height: 118px; }
  .prep-card-image { width: 96px; height: 100%; aspect-ratio: auto; }
  .prep-card-image>img { object-fit: cover; }
  .prep-card-body { padding: 9px 11px; }
  .prep-card-title { font-size: .8125rem; margin: 0; }
  .prep-card-reference { display: none; }
  .prep-card .prep-macros { display: block; margin: 6px 0 2px; }
  .prep-card .prep-macros>span:not(:first-child) { display: none; }
  .prep-card .prep-macros>span:first-child { display: flex; flex-direction: row; gap: 5px; align-items: baseline; }
  .prep-macros strong, .prep-macros small { font-size: .8125rem; }
  .prep-card-choose { min-height: 30px; padding-top: 4px; }
  .prep-card-energy { left: 4px; top: 4px; padding: 3px 4px; font-size: .8125rem; }
  .prep-card-energy small { font-size: .8125rem; }
}

@media (max-width: 380px) {
  .bottom-nav .nav-link>span:last-child { white-space: nowrap; letter-spacing: -.04em; }
  .workout-content { padding-inline: 13px!important; }
  .workout-target { padding: 11px 13px; }
  .workout-fields { gap: 7px; }
  .workout-stepper { min-height: 65px; }
  .rir-picker { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .rir-choice { min-width: 44px; min-height: 44px; }
  .nutrition-panel .macro-value { font-size: .9375rem; }
  .prep-card { grid-template-columns: 78px minmax(0,1fr); }
  .prep-card-image { width: 78px; }
  .prep-card-body { padding-inline: 8px; }
  .prep-card-energy { display: flex; flex-direction: column; gap: 0; top: auto; bottom: 0; width: 100%; border-radius: 0; }
  .prep-macros strong, .prep-macros small { font-size: .8125rem; }
  .workout-equipment-suggestion { grid-template-columns: minmax(0,1fr); }
  .workout-equipment-suggestion .btn { max-width: none; width: 100%; }
  .today-next-comparison { gap: 8px; }
}

/* A five-character load (102,5 · 31,25) stays whole: compact stepper up to 411px,
   one step smaller from 351 to 365px, where load and repetitions share a row.
   Narrow buttons keep a label such as +1,25 whole. */
@media (max-width: 411px) {
  .workout-stepper { grid-template-columns: 44px minmax(0,1fr) 44px; }
  .stepper-value input { font-size: 1.7rem!important; }
  .stepper-button { padding-inline: 2px; }
}
@media (min-width: 351px) and (max-width: 365px) {
  .stepper-value input { font-size: 1.5rem!important; }
}

@media (max-width: 350px) {
  .workout-fields { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .sheet form[data-form="quick-calories"] .form-grid.triple { grid-template-columns: minmax(0,1fr); }
  .sheet form[data-form="quick-calories"] .form-grid.triple .field:nth-child(3) { grid-column: auto; }
}

@media (min-width: 760px) {
  .sidebar { top: 0; bottom: 0; left: 0; width: 208px; border: 0; border-right: 1px solid var(--border); border-radius: 0; padding: 30px 22px; }
  .side-nav { margin-top: 58px; }
  .side-nav .nav-link { border-radius: 7px; font-size: .875rem; min-height: 47px; }
  .side-nav .nav-link.active { background: var(--selected); color: var(--accent); }
  .app-shell { margin-left: 208px; }
  .content { max-width: 1280px; padding: 0 40px 65px; }
  .masthead { height: 78px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
  .masthead:before { content: none; }
  .today-layout { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(290px,.85fr); gap: 38px; align-items: start; }
  .today-layout>.hero { grid-column: 1; grid-row: 1; position: relative; top: auto; }
  .today-ledger { grid-column: 2; grid-row: 1; }
  .nutrition-desktop { grid-template-columns: minmax(300px,.85fr) minmax(0,1.15fr); gap: 38px; }
  .nutrition-panel { border-right: 1px solid var(--border); padding-right: 30px; }
  .nutrition-meals { margin-top: 0; }
  .workout-shell { margin-left: 0!important; }
  .workout-content { max-width: 820px!important; padding-top: 12px!important; }
  .workout-focus { max-width: 780px; }
  .set-chip { flex: 1 1 0; }
  .rir-picker { grid-template-columns: repeat(7, minmax(0,1fr)); }
  .sheet { max-width: 620px; }
  .sheet-wide { max-width: 760px; }
  .toast { left: 230px; }
}

@media (min-width: 760px) and (max-width: 1099px) {
  .today-layout { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .today-layout>.hero, .today-ledger { grid-column: 1; grid-row: auto; }
  .nutrition-desktop { grid-template-columns: minmax(0,1fr); }
  .nutrition-panel { border-right: 0; padding-right: 0; }
}

@media (min-width: 1100px) {
  .route-today:has(>.today-next-card) { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(290px,.85fr); column-gap: 38px; align-items: start; }
  .route-today:has(>.today-next-card)>* { grid-column: 1/-1; }
  .route-today:has(>.today-next-card)>.today-layout { display: contents; }
  .route-today:has(>.today-next-card) .today-layout>.hero { grid-column: 1; grid-row: 3; }
  .route-today:has(>.today-next-card) .today-layout>.today-ledger { grid-column: 2; grid-row: 3 / span 2; }
  .route-today:has(>.today-next-card)>.today-next-card { grid-column: 1; grid-row: 4; margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .prep-card { transition: none; }
}

/* Precision refinement: the same theme, with a clearer reading and action hierarchy. */
:root {
  --precision-rule: var(--border);
}
body { letter-spacing: -.009em; }
p, li { line-height: 1.58; }
small, .small, .footer-note { font-size: .875rem; line-height: 1.5; }
.eyebrow, .tag { font-size: .8125rem; }
.btn { line-height: 1.35; }
.btn.secondary:hover, .btn.ghost:hover { background: var(--selected); border-color: var(--control-border); }
.btn.text-btn:hover { color: var(--focus); text-decoration: underline; text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
button:disabled, .btn:disabled, .icon-btn:disabled { cursor: not-allowed; }

/* The live session and its next action anchor the real home screen. */
.today-next-card { border-left: 3px solid var(--accent); }

/* The program is a scannable schedule, with one quiet route into each day. */
.session-resume-notice { border-radius: 9px; }
.session-resume-notice strong { line-height: 1.35; }
.program-grid .plan-card { grid-template-columns: 38px minmax(0,1fr); column-gap: 12px; padding-block: 18px 19px; }
.program-grid .plan-card .day-index { width: 38px; height: 38px; line-height: 2.375rem; padding: 0; }
.program-grid .plan-card :is(h2,h3) { margin: 4px 0 5px; font-size: 1.125rem; line-height: 1.3; }
.program-grid .plan-card p:not(.day-label) { font-size: .875rem; line-height: 1.48; }
.program-grid .plan-card p.tight { margin-top: 5px; }
.program-grid .plan-card .btn.ghost {
  width: auto;
  min-height: 44px;
  margin: 6px 0 -7px;
  padding: 8px 2px;
  justify-content: flex-start;
  border-color: transparent;
  background: transparent;
  color: var(--accent);
  font-size: .875rem;
}
.program-grid .plan-card .btn.ghost:hover { color: var(--focus); text-decoration: underline; text-underline-offset: 3px; }
.program-grid .plan-card.is-editing { grid-template-columns: 38px minmax(0,1fr) 44px; }
.program-grid .plan-card.is-editing > .icon-btn { width: 44px; min-width: 44px; }
.program-grid .rest-row { min-height: 64px; font-size: .875rem; }
.program-grid .rest-row > span:last-of-type { margin-left: auto; }
.history-item p, .history-item small { font-size: .875rem; }
.history-item :is(h2,h3) { margin-block: 5px; }

/* Compact, explicit nutrition corrections stay close to their measured entries. */
.nutrition-completeness {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0 15px;
  margin: 14px 0 3px;
  border-block: 1px solid var(--precision-rule);
}
.nutrition-completeness > div { min-width: 0; }
.nutrition-completeness-copy { min-width: 0; }
.nutrition-completeness strong { display: block; font-size: .875rem; line-height: 1.38; font-weight: 700; }
.nutrition-completeness small { display: block; margin-top: 4px; color: var(--muted); font-size: .8125rem; }
.nutrition-completeness .btn { min-width: 44px; white-space: nowrap; }
.nutrition-gap-list { border-top: 1px solid var(--precision-rule); margin-top: 18px; }
.nutrition-gap-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--precision-rule);
}
.nutrition-gap-row > div { min-width: 0; }
.nutrition-gap-row strong, .nutrition-gap-row small { display: block; overflow-wrap: anywhere; }
.nutrition-gap-row strong { font-size: .9375rem; line-height: 1.4; }
.nutrition-gap-row small { margin-top: 3px; color: var(--muted); font-size: .8125rem; }
.nutrition-gap-row .btn { min-width: 75px; }
.nutrition-panel .macro-label { font-size: .875rem; }
.nutrition-panel .macro-value { font-size: 1.125rem; }
.nutrition-summary > .energy-board .energy-main .energy-target { color: var(--muted); opacity: 1; }
.meal-heading :is(h2,h3) { line-height: 1.35; }
.meal-heading small, .food-entry small, .entry-main small, .entry-energy small { font-size: .8125rem; }
.meal > .btn-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; }
.meal > .btn-row .btn {
  min-width: 0;
  padding-inline: 2px;
  justify-content: flex-start;
  font-size: .8125rem;
  line-height: 1.3;
}
.meal > .btn-row .btn svg { flex: 0 0 16px; }
.food-entry .precision-entry-edit { max-width: 106px; white-space: normal; overflow-wrap: anywhere; }
.food-entry .precision-entry-edit small { font-size: .75rem; line-height: 1.32; white-space: normal; overflow-wrap: anywhere; }
.food-entry .entry-main { min-width: 0; }
.nutrition-quick-item strong, .nutrition-quick-item span { line-height: 1.4; }
.nutrition-toolbar .btn { border-radius: 8px; }
.nutrition-open-days { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--precision-rule); font-size: .8125rem; }
.nutrition-open-days .btn { min-height: 44px; }
.food-search-primary { margin: 0 0 10px; }
.food-search-primary input { min-height: 52px; font-size: 1rem; }
.food-picker-tools { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 4px 0 18px; }
.food-picker-tools .scan-block { grid-column: 1/-1; margin-bottom: 0; }
.food-picker-tools > .btn { min-width: 0; min-height: 48px; white-space: normal; line-height: 1.3; }
.food-flow-back { justify-content: flex-start; margin-bottom: 12px; }
.repeat-edit-lines { margin: 15px 0; border-block: 1px solid var(--precision-rule); }
.repeat-edit-line { display: grid; grid-template-columns: minmax(0,1fr) minmax(120px,180px); align-items: center; gap: 8px 14px; padding: 14px 0; border-bottom: 1px solid var(--precision-rule); }
.repeat-edit-line:last-child { border-bottom: 0; }
.repeat-edit-line > div:first-child { min-width: 0; }
.repeat-edit-line strong, .repeat-edit-line small { display: block; overflow-wrap: anywhere; }
.repeat-edit-line strong { font-size: .875rem; }
.repeat-edit-line small { margin-top: 3px; font-size: .75rem; color: var(--muted); }
.repeat-edit-line .field { margin: 0; }
.repeat-edit-line .checkbox { grid-column: 1/-1; margin: 0; }
.repeat-edit-line .attention, .repeat-summary .attention { color: var(--danger, #a83038); }
.repeat-summary { border-radius: 9px; margin: 14px 0; }
.repeat-add-picker { margin: 14px 0; }
.repeat-add-picker .field { margin-top: 12px; }
#repeat-food-results { display: grid; gap: 6px; margin-top: 8px; }
#repeat-food-results .btn { min-height: 44px; justify-content: flex-start; text-align: left; white-space: normal; }
.repeat-day-meals { display: grid; gap: 14px; margin-top: 16px; }
.repeat-day-meal { min-width: 0; padding: 14px; border: 1px solid var(--precision-rule); border-radius: 9px; }
.repeat-day-meal h3 { margin: 0 0 10px; font-size: 1rem; overflow-wrap: anywhere; }
.nutrition-review-sheet > p { line-height: 1.5; }
.sheet:has(form[data-form="repeat-meal"], form[data-form="repeat-day"]) .form-footer { position: static; bottom: auto; margin: 18px 0 0; padding: 14px 0 max(24px,var(--safe-bottom)); }

/* Progress reports separate the actual point, period, graph and dated log. */
.weight-overview { gap: 16px; padding-block: 1px 5px; }
.weight-overview .num-lg { line-height: 1.08; }
.period-control { margin-block: 17px 22px; }
.period-control button { padding-inline: 16px; }
.chart-wrap { padding: 16px 14px 10px; margin-block: 18px; }
.chart .axis { font-size: .6875rem; }
.chart-wrap .legend { font-size: .8125rem; padding-block: 5px; }
.graph-data summary { padding-inline: 14px; }
.weight-context { gap: 18px; }
.weight-context {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  max-width: none;
  padding: 0 0 21px;
  margin: 20px 0 28px;
  text-align: left;
  border-bottom: 1px solid var(--precision-rule);
}
.weight-context > div { min-width: 0; }
.weight-context strong { font-variant-numeric: tabular-nums; }
.weight-context small { font-size: .8125rem; line-height: 1.45; }

/* Forms give labels and confirmed values a dependable visual rhythm. */
.sheet-heading { border-bottom: 1px solid var(--precision-rule); }
.sheet-heading .eyebrow { font-size: .8125rem; line-height: 1.4; }
.sheet-content .field > span { font-size: .875rem; line-height: 1.45; font-weight: 650; }
.sheet-content .field small, .sheet-content .small { font-size: .8125rem; line-height: 1.55; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--accent-fill); }
.field input:disabled, .field select:disabled, .field textarea:disabled { opacity: .72; }
.sheet-content .form-subtitle { font-size: 1.125rem; }
.form-live-total { border-left: 3px solid var(--accent); }
.sheet-content .checkbox { border: 1px solid var(--precision-rule); border-radius: 8px; }
.sheet-content .checkbox:has(input:checked) { border-color: var(--accent-fill); background: var(--selected); }
.sheet-content .checkbox:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.sheet .form-footer { border-top: 1px solid var(--precision-rule); }
.sheet-content details.bordered > summary { line-height: 1.45; }
/* The proposal preview keeps its line breaks but wraps inside the sheet, in the interface font. */
.impact-preview {
  margin: 16px 0; padding: 12px 14px;
  border: 1px solid var(--precision-rule); border-radius: 8px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: .875rem; line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
/* Training on a day without a planned session: one row per remaining session, then the adapted week. */
.scan-block { display: grid; gap: 2px; margin: 0 0 16px; }
.scan-block .btn svg { margin-right: 6px; }
.beat-list { list-style: none; margin: 4px 0 10px; padding: 0; border-top: 1px solid var(--precision-rule); }
.beat-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid var(--precision-rule); font-size: .875rem; line-height: 1.4; }
.beat-list li span { min-width: 0; overflow-wrap: anywhere; }
.beat-list li strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.adapt-group { margin: 18px 0 0; font-size: .8125rem; font-weight: 700; color: var(--muted); }
.adapt-group + .adapt-choices { margin-top: 8px; }
.adapt-choices { display: grid; gap: 8px; margin: 14px 0; }
.adapt-choice {
  display: grid; gap: 4px; width: 100%; min-height: 44px; padding: 12px 14px;
  border: 1px solid var(--precision-rule); border-radius: 8px; background: var(--surface);
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.adapt-choice:hover { border-color: var(--control-border); background: var(--selected); }
.adapt-choice.is-advised { border-color: var(--accent-fill); }
.adapt-choice-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.adapt-choice-head strong { font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; }
.adapt-choice-when, .adapt-choice-reason { font-size: .875rem; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.adapt-choice-when { color: var(--text); }
.adapt-plan { list-style: none; margin: 12px 0 14px; padding: 0; border-top: 1px solid var(--precision-rule); }
.adapt-plan li { padding: 10px 0; border-bottom: 1px solid var(--precision-rule); font-size: .875rem; overflow-wrap: anywhere; }
.adapt-plan li small { display: block; margin-top: 2px; color: var(--muted); }

/* The public guide reads like documentation, with an actual contents list. */
.auth-page--guide { max-width: 1080px; padding: clamp(28px,4vw,58px) 24px 70px; }
.auth-page--guide > .auth-brand { width: fit-content; font-size: 3rem; }
.auth-page--guide > .auth-brand img { border-radius: 12px; }
.auth-page--guide > .eyebrow { margin: 28px 0 9px; }
.auth-page--guide > h1 { max-width: 720px; margin-bottom: 10px; }
.auth-page--guide > .auth-lead { max-width: 650px; margin-bottom: 36px; font-size: 1rem; }
.guide-layout { display: grid; grid-template-columns: 245px minmax(0,1fr); gap: clamp(28px,4vw,58px); align-items: start; }
.guide-index { position: sticky; top: 28px; padding: 19px; border: 1px solid var(--precision-rule); border-radius: 10px; background: var(--surface); }
.guide-index strong { display: block; margin-bottom: 10px; font-size: .875rem; }
.guide-index a { display: flex; align-items: center; min-height: 44px; padding: 7px 0; color: var(--muted); text-decoration: none; font-size: .875rem; line-height: 1.35; }
.guide-index a + a { border-top: 1px solid var(--precision-rule); }
.guide-index a:hover { color: var(--accent); }
.guide-section { padding: 23px 0 30px; border-top: 1px solid var(--precision-rule); scroll-margin-top: 24px; }
.guide-section + .guide-section { margin-top: 15px; }
.guide-section > .eyebrow { margin: 0 0 8px; color: var(--accent); font-size: .8125rem; font-weight: 700; }
.guide-section h2 { max-width: 660px; margin: 0 0 23px; font-size: clamp(1.4375rem,3vw,1.9375rem); line-height: 1.18; }
.guide-section h3 { margin: 23px 0 7px; font-size: 1.0625rem; line-height: 1.35; scroll-margin-top: 24px; }
.guide-section p:not(.eyebrow) { max-width: 68ch; margin: 0; color: var(--muted); font-size: .9375rem; line-height: 1.65; }
.guide-section code { padding: 2px 4px; border-radius: 4px; background: var(--surface-2); color: var(--text); }
.guide-return { margin: 10px 0 0; }

@media (max-width: 759px) {
  .content { padding-bottom: calc(92px + var(--safe-bottom)); }
  .nutrition-completeness { grid-template-columns: minmax(0,1fr); gap: 3px; }
  .nutrition-completeness .btn { justify-content: flex-start; width: fit-content; padding-block: 7px; }
  .nutrition-gap-row { grid-template-columns: minmax(0,1fr) auto; }
  .nutrition-gap-row .btn { min-width: 75px; }
  .repeat-edit-line { grid-template-columns: minmax(0,1fr); }
  .repeat-edit-line .checkbox { grid-column: 1; }
  .nutrition-panel .macro-value { font-size: 1rem; }
  .sheet-content { scroll-padding-bottom: calc(110px + var(--safe-bottom)); }
  .weight-context { grid-template-columns: minmax(0,1fr); gap: 0; margin-block: 14px 25px; }
  .weight-context > div { padding: 14px 0; }
  .weight-context > div + div { border-top: 1px solid var(--precision-rule); }
  .auth-page--guide { padding: 30px 20px 52px; }
  .auth-page--guide > .auth-lead { margin-bottom: 25px; }
  .guide-layout { display: block; }
  .guide-index { position: static; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; margin-bottom: 26px; padding: 15px; }
  .guide-index strong { grid-column: 1/-1; }
  .guide-index a + a { border-top: 0; }
  .guide-index a { border-top: 1px solid var(--precision-rule); }
  .guide-section { padding-bottom: 22px; }
  .guide-section p:not(.eyebrow) { font-size: .875rem; }
}

@media (max-width: 350px) {
  .meal > .btn-row { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2px; }
  .meal > .btn-row .btn { font-size: .75rem; gap: 3px; }
  .nutrition-gap-row { grid-template-columns: minmax(0,1fr); }
  .nutrition-gap-row .btn { width: fit-content; }
}

@media (min-width: 760px) {
  .route-nutrition .nutrition-toolbar { max-width: 350px; }
  .route-today .today-ledger { padding-top: 3px; }
  .program-grid { column-gap: 28px; }
  .program-grid .plan-card { min-height: 178px; }
  .program-grid .rest-row { min-height: 178px; }
  .sheet {
    inset: 0;
    margin: auto;
    width: min(calc(100vw - 48px), 620px);
    max-height: min(88dvh, 820px);
    border: 1px solid var(--precision-rule);
    border-radius: 14px;
    box-shadow: 0 24px 80px #101b3f3b;
  }
  .sheet-wide { width: min(calc(100vw - 48px),760px); }
  .sheet[open] { animation: none; }
  .sheet::backdrop { background: #0c173b78; }
  .sheet-heading { padding: 21px 25px; }
  .sheet-content { padding: 24px 25px 28px; }
  .sheet .form-footer { bottom: -28px; margin-bottom: -28px; padding-bottom: 28px; }
}

@media (max-height: 600px) and (min-width: 760px) {
  .sheet { max-height: calc(100dvh - 24px); }
}

/* Séance en cours · maquette validée le 27/09/2026 (Figma « BLOC · Précision 2 »).
   Groupé par l’espace et des filets de 1 px ; un seul rayon (10 px) ; défaut = contour neutre, saisi = aplat. */
.workout-focus { padding-top: 0; }
.workout-focus .workout-focus-head { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; gap: 4px; min-height: 48px; margin: 0 -12px 4px; }
.workout-focus .focus-back, .workout-focus .focus-menu { width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; justify-self: center; border-radius: 10px; color: var(--text); }
.focus-title { display: grid; min-width: 0; }
.focus-title strong { overflow: hidden; font-size: .9375rem; line-height: 1.375rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.focus-title small { font-size: .8125rem; line-height: 1.125rem; color: var(--muted); }
.workout-focus .workout-heading { display: block; padding: 4px 0 0; border: 0; }
.workout-focus .workout-heading h1 { margin: 0; font-size: 1.5rem; line-height: 1.875rem; font-weight: 750; letter-spacing: -.018em; overflow-wrap: anywhere; }
.workout-rx { margin: 4px 0 0; font-size: .9375rem; line-height: 1.375rem; color: var(--muted); }

.set-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(68px,1fr); gap: 8px; min-width:0; max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; scrollbar-width:thin; padding-block:12px 4px; }
.set-step { display: grid; align-content: start; gap: 6px; min-width: 0; min-height: 52px; margin: 0; padding: 0 0 4px; border: 0; border-radius: 0; background: none; color: var(--muted); font: inherit; text-align: left; box-shadow: none; }
.set-step::before { content: ""; display: block; height: 3px; border-radius: 2px; background: var(--border); }
.set-step.is-done::before { background: var(--accent-fill); }
.set-step.is-current::before { background: color-mix(in srgb, var(--accent) 32%, var(--surface)); }
.set-step-name { display: flex; align-items: center; gap: 4px; font-size: .8125rem; line-height: 1.125rem; font-weight: 600; }
.set-step-name svg { color: var(--accent); }
.set-step strong { font-size: .8125rem; line-height: 1.125rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.set-step strong span { white-space: nowrap; }
.set-step.is-current .set-step-name, .set-step.is-current strong { color: var(--accent); }
.set-step.is-pending strong { color: var(--muted); font-weight: 600; }

.workout-last { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.workout-last summary { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; column-gap: 8px; min-height: 44px; list-style: none; cursor: pointer; }
.workout-last summary::-webkit-details-marker { display: none; }
.workout-last summary>svg { grid-column: 2; grid-row: 1 / span 2; color: var(--muted); transition: transform .15s; }
.workout-last details[open] summary>svg { transform: rotate(90deg); }
.workout-last-date, .workout-last-empty { display: block; margin: 0; font-size: .8125rem; line-height: 1.125rem; color: var(--muted); }
.workout-last-value { display: block; font-size: .9375rem; line-height: 1.375rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.workout-last-value strong { color: var(--text); font-weight: 700; }
.workout-last-goal, .workout-last-note { margin: 4px 0 0; font-size: .8125rem; line-height: 1.125rem; color: var(--text); }
.workout-last-note { color: var(--muted); }
.workout-last-list { display: grid; gap: 8px; padding: 8px 0 4px; }
.workout-last-list>p:not(.small) { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 0 8px; margin: 0; font-size: .9375rem; line-height: 1.375rem; font-variant-numeric: tabular-nums; }
.workout-last-list>p>span { color: var(--muted); font-size: .8125rem; }
.workout-last-list>p>small { grid-column: 2; font-size: .8125rem; line-height: 1.125rem; color: var(--muted); }

.workout-focus .workout-set-form { display: grid; gap: 12px; padding: 0; }
.set-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin: 8px 0 -6px; }
.set-head h2 { margin: 0; font-size: 1.0625rem; line-height: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
.set-context-link { display: inline-flex; align-items: center; gap: 4px; min-width: 0; min-height: 44px; margin-right: -8px; padding: 0 4px 0 12px; border: 0; background: none; color: var(--text); font: inherit; font-size: .9375rem; font-weight: 550; box-shadow: none; }
.set-context-link .control-state { overflow: hidden; max-width: 150px; font-size: .9375rem; text-overflow: ellipsis; white-space: nowrap; }
.set-context-link svg, .set-context summary>svg { flex: none; color: var(--muted); }

.workout-control .workout-control-label, .control-row .workout-control-label { font-size: .8125rem; line-height: 1.125rem; font-weight: 550; color: var(--muted); }
.workout-set-form .workout-fields, #sheet .workout-fields { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; }
.workout-focus .workout-fields { grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:10px; }
.workout-focus .workout-fields .workout-control { min-width:0; align-content:start; }
.workout-focus .workout-fields .workout-control-label { min-height:3em; display:flex; align-items:end; }
.workout-focus .workout-fields .workout-stepper:not(.no-step) { grid-template-columns:repeat(2,minmax(0,1fr)); border-radius:14px; }
.workout-focus .workout-fields .stepper-value { grid-column:1 / -1; grid-row:1; min-height:68px; border-bottom:1px solid var(--border); padding:8px 4px; align-items:center; }
.workout-focus .workout-fields .workout-stepper.no-step .stepper-value { border-bottom:0; min-height:113px; }
.workout-focus .workout-fields .stepper-value input { min-width:0; font-size:clamp(1.75rem,7vw,2.5rem)!important; max-width:calc(100% - 28px); }
.workout-focus .workout-fields [data-control="reps"] .stepper-value input { max-width:100%; }
.workout-focus .workout-fields .stepper-button { min-height:44px; border-top:0; }
.workout-focus .workout-fields .stepper-button:first-child { grid-column:1; grid-row:2; border-right:1px solid var(--border); }
.workout-focus .workout-fields .stepper-button:last-child { grid-column:2; grid-row:2; border-left:0; }
.workout-focus .workout-fields .stepper-unit { font-size:.875rem; }
.workout-focus .workout-assessment { display:grid; gap:12px; }
.workout-focus .workout-assessment.has-standard { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.workout-assessment .control-row { display:grid; gap:3px; align-items:start; }
.workout-assessment .standard-picker,.workout-assessment .technique-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.workout-assessment :is(.standard-choice,.technique-choice) { min-height:44px; padding:6px 4px; font-size:.8125rem; white-space:normal; }
.workout-focus .workout-fields ~ .field-note { margin:0; line-height:1.4; }
.workout-focus .set-head { align-items:start; margin:4px 0 0; }
.set-head-title { min-width:0; }
.workout-focus .set-head .workout-target { display:block; background:none; color:var(--muted); border:0; margin:4px 0 0; padding:0; font-size:.8125rem; }
.workout-focus .workout-last { margin:0; padding:8px 12px; border:1px solid var(--border); border-radius:12px; background:var(--surface); }
.workout-focus .workout-last.is-empty { border:0; background:none; padding:0; }
.workout-focus .workout-last summary { min-height:44px; padding-block:4px; }
.workout-help>summary { display:flex; align-items:center; gap:8px; color:var(--muted); }
.workout-menu-more { border-top:1px solid var(--border); margin-top:8px; }
.workout-menu-more>summary { color:var(--muted); font-size:.875rem; }
.workout-menu-more>.btn { margin:6px 0; }
@media(max-width:279px){.workout-focus .workout-fields,.workout-focus .workout-assessment.has-standard{grid-template-columns:minmax(0,1fr);}}
.workout-control { display: grid; gap: 6px; }
.workout-control .workout-stepper { display: grid; grid-template-columns: minmax(44px,64px) minmax(0,1fr) minmax(44px,64px); min-height: 64px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--control-border) 50%, var(--surface)); border-radius: 10px; background: var(--surface); }
.workout-control[data-control="reps"] .workout-stepper { min-height: 56px; }
.workout-control .workout-stepper.no-step { grid-template-columns: minmax(0,1fr); }
.workout-control .stepper-button { min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 0; background: var(--field); color: var(--accent); font-size: .9375rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.workout-control .stepper-button:first-child { border-right: 1px solid var(--border); }
.workout-control .stepper-button:last-child { border-left: 1px solid var(--border); }
.workout-control .stepper-value { display: flex; align-items: baseline; justify-content: center; gap: 5px; min-width: 0; padding: 0 6px; background: var(--surface); }
.workout-control .stepper-value input { flex: none; max-width: 100%; min-width: min(72px,100%); padding: 0 !important; font-size: 2.5rem !important; line-height: 1 !important; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; text-align: center; }
.workout-control .stepper-value .stepper-unit { margin: 0; font-size: 1.0625rem; font-weight: 550; color: var(--muted); }
.workout-control>small, .field-note { margin: -8px 0 0; font-size: .8125rem; line-height: 1.125rem; color: var(--muted); }

.control-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.control-state { font-size: .8125rem; line-height: 1.125rem; font-weight: 550; color: var(--muted); }
.workout-set-form .rir-control, #sheet .rir-control, .technique-control { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; }
.rir-control .rir-picker { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 6px; margin: 0; }
@media(max-width:359px) { .rir-control .rir-picker { grid-template-columns:repeat(3,minmax(0,1fr)); } }
.technique-control .technique-picker { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
.rir-control .rir-choice, .technique-control .technique-choice { min-width: 0; min-height: 44px; padding: 0 4px; border: 0; border-radius: 10px; background: var(--field); color: var(--text); font-size: .9375rem; font-weight: 650; box-shadow: none; }
.rir-control .rir-choice.selected, .technique-control .technique-choice.selected { background: var(--accent-fill); color: var(--on-accent); }
.technique-control .technique-choice.is-blocking.selected { background: var(--danger-fill); color: var(--on-accent); }
/* An unentered feeling leaves every choice neutral; recorded choices alone are filled. */
.control-note { display: none; margin: 0; font-size: .8125rem; line-height: 1.125rem; color: var(--danger); }
.technique-control:has(.is-blocking.selected) .control-note { display: block; }
.rir-control .rir-choice:focus-visible, .technique-control .technique-choice:focus-visible, .workout-control .stepper-button:focus-visible, .set-step:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.set-context { border-top: 1px solid var(--border); }
.set-context>summary { display: flex; align-items: center; gap: 8px; min-height: 48px; list-style: none; cursor: pointer; font-size: .9375rem; font-weight: 600; }
.set-context>summary::-webkit-details-marker { display: none; }
.set-context>summary .control-state { margin-left: auto; overflow: hidden; max-width: 55%; font-size: .9375rem; text-overflow: ellipsis; white-space: nowrap; }
.set-context[open]>summary>svg { transform: rotate(90deg); }
.set-context.is-linked>summary, .set-context.is-linked:not([open]) { display: none; }
.set-context.is-linked[open] { padding-top: 12px; }
.set-context-body { display: grid; gap: 12px; padding-bottom: 8px; }
.set-context-body .field { margin: 0; }
#sheet .workout-fields ~ .rir-control, #sheet .workout-fields ~ .technique-control, #sheet .workout-fields ~ .set-context { margin-top: 14px; }

/* Full-bleed background and rule drawn as ink overflow (shadow, border image): no horizontal scroll. */
.workout-focus .validate-bar { position: sticky; bottom: 0; z-index: 5; margin-top: 6px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: var(--bg); box-shadow: 0 0 0 100vmax var(--bg); clip-path: inset(0 -100vmax); border-top: 1px solid var(--border); border-image: linear-gradient(var(--border), var(--border)) 1 / 1px 0 0 / 0 100vmax; }
.route-workout .validate-bar .active-validate { position: static; inset: auto; justify-content: center; width: 100%; max-width: none; min-height: 52px; margin: 0; border-radius: 10px; box-shadow: none; font-size: 1.0625rem; font-weight: 650; }
@media(max-width:759px) { .workout-focus .validate-bar { position:fixed; inset:auto 17px 0; max-width:786px; margin:0 auto; z-index:14; } }
body:has(.route-workout .validate-bar)::after { display: none; }
.workout-focus .workout-notes { margin-top: 8px; }
.workout-target { margin: -4px 0 12px; font-size: .875rem; line-height: 1.5; color: var(--muted); }
.workout-set-form > .workout-last { margin-top: 0; }
.workout-feel { border-top: 1px solid var(--border); }
.workout-feel > summary, .rest-settings > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: .875rem; }
.workout-feel[open] .rir-control, .workout-feel[open] .technique-control { margin-top: 12px; }
.workout-focus .workout-rest .timer-value { font-size: clamp(3rem,15vw,4rem); }
.workout-focus .workout-rest .rest-top > .btn { color: var(--on-accent); border: 1px solid currentColor; min-height: 44px; }
.rest-actions { display: flex; justify-content: stretch; }
.rest-actions .rest-ready { width: 100%; min-height: 52px; font-size: 1.0625rem; }
.workout-transition, .runtime-decision { margin-block: 14px; padding: 18px; }
.workout-step-result { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: .875rem; }
@media (max-width: 759px) {
  .workout-focus { padding-bottom: 0; }
}
@media (min-width: 760px) {
  .workout-focus { max-width: 560px; margin-inline: auto; }
}

/* Aujourd’hui · maquette validée le 27/09/2026 (Figma « BLOC · Précision 2 », page Aujourd’hui).
   Pas de carte : la séance du jour, la nutrition et la semaine sont séparées par l’espace et des filets de 1 px. */
.masthead .saved-pill[data-phase="ready"], .masthead .saved-pill[data-phase="saved"] { display: none; }
.masthead .icon-btn { border-color: transparent; background: none; box-shadow: none; }
@media (max-width: 759px) {
  .masthead { height: 56px; margin: 0; }
  .masthead .bloc-wordmark { width: auto; height: 26px; }
  .masthead .brand-caption { display: none; }
}
.route-today .today-dateline { display: block; margin: 8px 0 0; padding: 0; border: 0; }
.route-today .today-dateline h1 { margin: 0; font-size: 1.5rem; line-height: 1.875rem; font-weight: 750; letter-spacing: -.018em; }
.route-today .today-dateline time { display: inline; font-size: inherit; font-weight: inherit; text-transform: none; }
.route-today .today-dateline .block-link { display: inline-flex; justify-content: flex-start; max-width: none; min-height: var(--tap-size); padding: 0; margin: 0; border: 0; border-radius: 0; background: none; color: var(--muted); font-size: .9375rem; font-weight: 450; text-align: left; white-space: nowrap; }

.route-today .week-rail { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 0; margin: 12px 0 0; padding: 0; border: 0; max-width: none; }
.route-today .week-day { display: grid; justify-items: center; gap: 4px; min-height: 72px; padding: 4px 0; border: 0; border-radius: 10px; background: none; box-shadow: none; color: var(--muted); }
.route-today .week-day span { font-size: .8125rem; line-height: 1.125rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }
.route-today .week-day strong { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; font-size: 1.0625rem; line-height: 1; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.route-today .week-day.is-rest strong { color: var(--muted); font-weight: 500; }
.route-today .week-day.is-today span { color: var(--accent); }
.route-today .week-day.is-today strong { background: var(--accent-fill); color: var(--on-accent); }
.route-today .week-day i, .route-today .week-day.is-today i, .route-today .week-day.is-planned i { display: grid; place-items: center; width: auto; height: 12px; border-radius: 0; background: none; font-style: normal; font-size: .75rem; line-height: 1; color: var(--accent); }
.route-today .week-day.is-planned:not(.is-today) i::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.route-today .week-day.is-active i::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-fill); }
.route-today .week-day.is-today.is-active i::after { background: var(--accent-fill); }

.route-today .today-layout { display: block; margin: 0; }
.route-today .hero.today-plan { position: static; min-height: 0; margin: 0; padding: 20px 0 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.today-plan>h2 { margin: 0; font-size: 1.5rem; line-height: 1.875rem; font-weight: 750; letter-spacing: -.018em; overflow-wrap: anywhere; }
.today-plan-meta { margin: 2px 0 0; font-size: .9375rem; line-height: 1.375rem; color: var(--muted); }
.today-plan-list { margin: 14px 0 0; padding: 0; list-style: none; }
.today-plan-list li { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.today-plan-list li>div { display: grid; min-width: 0; }
.today-plan-list strong { font-size: .9375rem; line-height: 1.375rem; font-weight: 650; overflow-wrap: anywhere; }
.today-plan-list small { font-size: .8125rem; line-height: 1.125rem; color: var(--muted); }
.today-plan-list li>span { font-size: .9375rem; line-height: 1.375rem; font-weight: 500; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.today-plan-action { justify-self: start; min-height: 0; margin: 0; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: .8125rem; line-height: 1.125rem; font-weight: 650; text-align: left; box-shadow: none; }
.today-plan-action::after { content: " ›"; }
.today-plan-note { margin: 12px 0 0; font-size: .8125rem; line-height: 1.125rem; color: var(--muted); }
.today-plan-actions { display: grid; gap: 4px; margin-top: 16px; }
.route-today .today-plan .hero-cta { justify-content: center; min-height: 52px; margin: 0; padding: 0 16px; border-radius: 10px; font-size: 1.0625rem; font-weight: 650; box-shadow: none; }
.route-today .today-plan .text-btn { min-height: 44px; justify-content: center; font-size: .9375rem; font-weight: 650; }
.today-next-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; width: 100%; margin-top: 14px; padding: 12px 0; border: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: none; color: var(--text); font: inherit; text-align: left; box-shadow: none; }
.today-next-row>span { display: grid; min-width: 0; }
.today-next-row small { font-size: .8125rem; line-height: 1.125rem; color: var(--muted); }
.today-next-row strong { font-size: .9375rem; line-height: 1.375rem; font-weight: 650; }
.today-next-row svg { color: var(--muted); }
.today-now { display: grid; gap: 4px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.today-now small { font-size: .8125rem; line-height: 1.125rem; color: var(--muted); }
.today-now strong { font-size: 1.5rem; line-height: 1.875rem; font-weight: 650; letter-spacing: -.018em; font-variant-numeric: tabular-nums; }
.today-meter { height: 4px; margin-top: 4px; border-radius: 2px; background: var(--border); overflow: hidden; }
.today-meter>span { display: block; height: 100%; border-radius: 2px; background: var(--accent-fill); }

.route-today .today-ledger { display: block; margin: 0; padding: 0; border: 0; }
.today-nutrition { display: grid; gap: 10px; padding-top: 20px; }
.today-nutrition .section-heading, .today-week .section-heading { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin: 0; }
.today-nutrition .section-heading h2, .today-week .section-heading h2 { margin: 0; font-size: 1.0625rem; line-height: 1.5rem; font-weight: 650; }
.today-nutrition .section-heading a, .today-week .section-heading .text-btn { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0; color: var(--accent); font-size: .9375rem; font-weight: 650; text-decoration: none; }
.today-energy { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.today-energy p { margin: 0; font-size: .9375rem; color: var(--muted); }
.today-energy strong { font-size: 1.5rem; line-height: 1.875rem; font-weight: 650; color: var(--text); letter-spacing: -.018em; }
.today-energy small { font-size: .8125rem; line-height: 1.125rem; color: var(--muted); text-align: right; }
.today-macros { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; padding-top: 4px; }
.today-macro { display: grid; }
.today-macro span { font-size: .8125rem; line-height: 1.125rem; color: var(--muted); }
.today-macro strong { font-size: .9375rem; line-height: 1.375rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.today-macro small { font-size: .8125rem; font-weight: 500; color: var(--muted); }
.today-nutrition .today-plan-note { margin: 0; }
.route-today .today-add-food { justify-content: center; gap: 6px; min-height: 44px; margin: 2px 0 0; border: 1px solid color-mix(in srgb, var(--control-border) 50%, var(--surface)); border-radius: 10px; background: var(--surface); color: var(--accent); font-size: .9375rem; font-weight: 650; box-shadow: none; }
.today-measures { padding-top: 24px; }
.today-measure { display: grid; grid-template-columns: minmax(0,1fr) minmax(44px,max-content); align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.today-measure>div { display: grid; min-width: 0; }
.today-measure span, .today-measure small { font-size: .8125rem; line-height: 1.125rem; color: var(--muted); }
.today-measure strong { font-size: .9375rem; line-height: 1.375rem; font-weight: 650; }
.today-measure .icon-btn { width: 44px; height: 44px; border: 1px solid color-mix(in srgb, var(--control-border) 50%, var(--surface)); border-radius: 10px; background: var(--surface); color: var(--accent); }
.today-week { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--border); }
.today-week .week-facts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 4px 0 0; padding: 0; border: 0; }
.today-week .week-facts>div { display: grid; align-content: start; padding: 0; border: 0; background: none; }
.today-week .week-facts strong { font-size: 1.5rem; line-height: 1.875rem; font-weight: 650; letter-spacing: -.018em; font-variant-numeric: tabular-nums; }
.today-week .week-facts span { font-size: .8125rem; line-height: 1.125rem; color: var(--muted); }
.route-today>.today-next-card { margin-top: 24px; }
@media (min-width: 1100px) {
  .route-today .today-layout { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 48px; align-items: start; }
  .route-today .today-nutrition { padding-top: 20px; }
  .route-today .week-rail { max-width: 460px; }
}

/* Mode sombre graphite · maquette validée le 27/09/2026 (Figma « BLOC · Précision 2 », page Mode sombre).
   Fonds neutres ; --accent-fill (bleu plein, texte blanc) pour agir et pour le saisi ; --accent (bleu clair) pour les liens et les traits. */
:root[data-appearance="dark"] .sheet::backdrop { background: #000000a6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-appearance="light"]) .sheet::backdrop { background: #000000a6; }
}

/* Progrès · maquette validée le 27/09/2026 (HTML, esprit Whoop / Strava) : visuel d'abord, texte minimal.
   Trois teintes de données : --accent (entraînement), --data-teal (protéines), --data-violet (calories, poids). */
:root { --data-teal: #0E9F92; --data-violet: #6B4DE6; --data-bar: #DCE2F0; --data-glow: #E3E9FF; }
:root[data-appearance="dark"] { --data-teal: #4FD1C5; --data-violet: #B79CFF; --data-bar: #2A2F3A; --data-glow: #222A4A; }
@media (prefers-color-scheme: dark) {
  :root:not([data-appearance="light"]) { --data-teal: #4FD1C5; --data-violet: #B79CFF; --data-bar: #2A2F3A; --data-glow: #222A4A; }
}
.progress-v2 { max-width: 620px; font-variant-numeric: tabular-nums lining-nums; }
.progress-v2 button { font: inherit; color: inherit; text-align: left; }
.pg-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 16px; }
.pg-top h1 { margin: 0; }
.pg-title { margin: 0 0 14px; }
.pg-back { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap-size); padding: 0; border: 0; background: none; font-size: .9375rem; font-weight: 700; color: var(--accent) !important; cursor: pointer; }
.pg-back-icon { display: inline-flex; transform: rotate(180deg); }
.pg-range { position: relative; display: inline-flex; align-items: center; }
.pg-range select { appearance: none; height: 34px; padding: 0 30px 0 13px; border: 0; border-radius: 17px; background: var(--surface-2); color: var(--text); font: inherit; font-size: .8125rem; font-weight: 700; }
.pg-range svg { position: absolute; right: 11px; pointer-events: none; transform: rotate(90deg); opacity: .7; }
.pg-stack > * + * { margin-top: 12px; }
.pg-card { display: block; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 16px; }
button.pg-card { cursor: pointer; }
.pg-kicker { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .8125rem; font-weight: 700; color: var(--muted); }
.pg-go { display: inline-flex; opacity: .6; }

.pg-hero { padding: 18px 0 0; overflow: hidden; background: radial-gradient(120% 90% at 85% 0%, var(--data-glow) 0%, var(--surface) 60%); }
.pg-hero > .pg-kicker, .pg-hero-num, .pg-sub { padding-left: 18px; padding-right: 18px; }
.pg-hero-num { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 4px 10px; padding-top: 6px; }
.pg-big { font-size: 4.75rem; line-height: .9; font-weight: 800; letter-spacing: -.06em; }
.pg-unit { padding-bottom: 8px; font-size: 1.375rem; font-weight: 700; color: var(--muted); }
.pg-badge { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 12px; padding: 5px 9px; border-radius: 10px; white-space: nowrap; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-size: .8125rem; font-weight: 800; }
.pg-sub { display: block; padding-top: 6px; font-size: .8125rem; color: var(--muted); }
.pg-hero > svg { display: block; width: 100%; margin-top: 8px; overflow: visible; }
.pg-badge svg { flex: none; }
.pg-next { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px 14px; border-top: 1px solid var(--border); font-size: .8125rem; color: var(--muted); }
.pg-next strong { color: var(--text); font-size: .9375rem; font-weight: 800; white-space: nowrap; }
.pg-lonely { margin: 6px 18px 12px; font-size: .8125rem; color: var(--muted); }
.pg-svg-axis { font-size: .75rem; font-weight: 600; fill: var(--muted); opacity: 1; }
.pg-svg-axis.now { fill: var(--text); opacity: 1; }
.pg-svg-value { font-size: .75rem; font-weight: 700; fill: var(--muted); }
.pg-svg-value.last { font-weight: 800; fill: var(--text); }
.pg-svg-note { font-size: .6875rem; font-weight: 700; fill: var(--muted); }

.pg-rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 16px 8px 14px; }
.pg-ring { display: grid; justify-items: center; gap: 8px; }
.pg-ring svg { width: 92px; height: 92px; }
.pg-ring > span { font-size: .8125rem; font-weight: 700; color: var(--muted); }
.pg-ring-value { font-size: 1.25rem; font-weight: 800; fill: var(--text); }
.pg-ring-of { font-size: .8125rem; font-weight: 700; fill: var(--muted); }

.pg-weight { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.pg-weight-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--data-violet) 16%, transparent); color: var(--data-violet); }
.pg-weight-value { display: block; font-size: 1.375rem; font-weight: 800; letter-spacing: -.04em; }
.pg-weight small { display: block; font-size: .8125rem; line-height: 1.35; color: var(--muted); }
.pg-weight-btn { min-height: var(--tap-size); padding: 0 14px; white-space: nowrap; }

.pg-volume-head { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 8px; }
.pg-volume-head strong { font-size: 2.5rem; line-height: 1; font-weight: 800; letter-spacing: -.05em; }
.pg-volume-head small { margin-left: 4px; font-size: .9375rem; font-weight: 700; letter-spacing: -.01em; color: var(--muted); }
.pg-up { font-size: .875rem; font-weight: 800; color: var(--accent); }
.pg-volume svg, .pg-kcal svg { display: block; width: 100%; margin-top: 12px; overflow: visible; }

.pg-section { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 26px 2px 10px; }
.pg-section h2 { margin: 0; font-size: 1.1875rem; font-weight: 800; letter-spacing: -.035em; }
.pg-section span { font-size: .8125rem; font-weight: 700; color: var(--muted); text-align: right; }
.pg-section b { color: var(--accent); }
.pg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pg-tile { display: block; width: 100%; padding: 14px 14px 0; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; cursor: pointer; }
.pg-tile-name { display: block; font-size: .8125rem; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-tile-comparison { display: block; margin-top: 7px; font-size: .8125rem; line-height: 1.45; font-weight: 650; overflow-wrap: anywhere; }
.pg-tile-gain { display: block; margin-top: 4px; font-size: 1.625rem; font-weight: 800; letter-spacing: -.05em; }
.pg-tile svg { display: block; width: calc(100% + 28px); margin: 6px -14px 0; }
.pg-all { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap-size); margin: 8px 2px 0; padding: 0; border: 0; background: none; font-size: .875rem; font-weight: 700; color: var(--accent) !important; cursor: pointer; }
.pg-empty { margin: 0; padding: 14px 2px; font-size: .875rem; color: var(--muted); }

.pg-more { padding: 0; overflow: hidden; }
.pg-more-row { display: flex; width: 100%; align-items: center; justify-content: space-between; min-height: 50px; padding: 0 16px; border: 0; background: none; font-size: .9375rem; font-weight: 700; cursor: pointer; }
.pg-more-row + .pg-more-row { border-top: 1px solid var(--border); }
.pg-more-row svg { opacity: .5; }

/* Détail d'un exercice */
.pg-chips { display: flex; gap: 8px; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; }
.pg-chip { flex: none; height: 34px; padding: 0 14px; border: 0; border-radius: 17px; background: var(--surface-2); color: var(--muted) !important; font-size: .8125rem; font-weight: 750; cursor: pointer; }
.pg-chip[aria-pressed="true"] { background: var(--accent-fill); color: #fff !important; }
.pg-records { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.pg-record { display: grid; justify-items: center; gap: 2px; padding: 12px 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.pg-record span { font-size: .75rem; font-weight: 700; color: var(--muted); }
.pg-record strong { font-size: 1.25rem; font-weight: 800; letter-spacing: -.04em; }
.pg-record strong small { font-size: .75rem; font-weight: 700; color: var(--muted); }
.pg-record > small { font-size: .6875rem; font-weight: 600; color: var(--muted); opacity: .8; }
.pg-record.top { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.pg-record.top strong { color: var(--accent); }
.pg-history, .pg-list { padding: 0; overflow: hidden; }
.pg-history-row { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; width: 100%; padding: 13px 16px; border: 0; background: none; cursor: pointer; }
.pg-history-row + .pg-history-row { border-top: 1px solid var(--border); }
.pg-history-date { font-size: .875rem; font-weight: 800; }
.pg-history-date small { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); }
.pg-sets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pg-set { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 8px; background: var(--surface-2); font-size: .8125rem; font-weight: 750; }
.pg-set.top { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.pg-set em { margin-left: 4px; font-style: normal; font-weight: 700; color: var(--muted); }
.pg-row { display: grid; grid-template-columns: minmax(0, 1fr) 56px auto; gap: 10px; align-items: center; width: 100%; padding: 10px 16px; border: 0; background: none; cursor: pointer; }
.pg-row + .pg-row { border-top: 1px solid var(--border); }
.pg-row-text strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .9375rem; font-weight: 700; line-height: 1.3; }
.pg-row-text small { display: block; font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-row svg { width: 56px; height: 26px; }
.pg-row-gain { min-width: 58px; font-size: .875rem; font-weight: 800; text-align: right; white-space: nowrap; color: var(--muted); }
.pg-row-gain.up { color: var(--accent); }
.pg-row-gain.down { color: var(--danger); }

/* Profils · « Qui s'entraîne ? » une fois par appareil, puis le profil s'ouvre directement. */
.profile-avatar { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; color: #fff; font-weight: 800; font-size: 1.0625rem; letter-spacing: -.02em; }
.profile-avatar.small { width: 1.875rem; height: 1.875rem; font-size: .8125rem; }
.profile-avatar.large { width: 6rem; height: 6rem; border-radius: 28px; font-size: 2.5rem; }
.profile-blue { background: #2447EB; } .profile-teal { background: #0E9F92; } .profile-violet { background: #6B4DE6; }
.profile-rose { background: #D6336C; } .profile-green { background: #2F9E44; } .profile-orange { background: #E8590C; }
.profile-add { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--border); }
.profile-picker { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 32px 20px; background: var(--bg); text-align: center; }
.profile-brand { font-size: 1.75rem; font-weight: 800; letter-spacing: -.06em; color: var(--accent); }
.profile-brand span { color: var(--text); }
.profile-picker h1 { margin: 0; font-size: 1.875rem; letter-spacing: -.04em; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, 112px); justify-content: center; gap: 18px 14px; width: 100%; max-width: 520px; }
.profile-card { display: grid; justify-items: center; gap: 10px; padding: 6px 0; border: 0; background: none; color: var(--text); cursor: pointer; font: inherit; }
.profile-card:focus-visible .profile-avatar, .profile-card:hover .profile-avatar { outline: 3px solid var(--accent); outline-offset: 3px; }
.profile-name { display: inline-flex; align-items: center; gap: 5px; font-size: .9375rem; font-weight: 700; max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-lock { flex: none; color: var(--muted); }
.profile-note { margin: 0; font-size: .8125rem; color: var(--muted); }
.profile-badge { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; background: none; cursor: pointer; }
.profile-colors { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; padding: 0; border: 0; }
.profile-colors legend { margin-bottom: 8px; font-size: .875rem; font-weight: 700; }
.profile-color { position: relative; cursor: pointer; }
.profile-color input { position: absolute; opacity: 0; }
.profile-color input:checked + .profile-avatar { outline: 3px solid var(--text); outline-offset: 2px; }
.profile-color input:focus-visible + .profile-avatar { outline: 3px solid var(--accent); outline-offset: 2px; }
.profile-menu-head { display: flex; justify-content: center; margin: 4px 0 12px; }

/* Multi-food editor: quantity stays next to its checked food. */
.batch-food-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(110px,150px); gap:12px; align-items:center; border-bottom:1px solid var(--line); padding:12px 0; }
.batch-food-row .field { margin:0; }
.batch-food-row .checkbox { min-width:0; }
.batch-food-row .checkbox span { overflow-wrap:anywhere; }
.batch-food-row input[inputmode="decimal"] { width:100%; }
.nutrition-summary-compact .nutrition-overview { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); gap:16px; padding:16px; background:var(--surface); border:1px solid var(--border); border-radius:10px; }
.nutrition-summary-compact .nutrition-overview .energy-board { padding:0; border:0; border-radius:0; overflow:visible; background:none; box-shadow:none; min-width:0; color:var(--text); }
.nutrition-summary-compact .energy-board .energy-main .energy-target { color:var(--muted); opacity:1; }
.nutrition-summary-compact .energy-main { margin:8px 0; }
.nutrition-summary-compact .energy-main > .num-lg { font-size:clamp(1.75rem,8vw,2.375rem); }
.nutrition-summary-compact .nutrition-overview .macro-row { display:flex; flex-direction:column; align-items:flex-start; gap:8px; padding:0; border:0; min-width:0; }
.nutrition-summary-compact .nutrition-overview .macro-row:is([data-macro="carbs"],[data-macro="fat"]) { border-top:1px solid var(--border); padding-top:16px; }
.nutrition-summary-compact .nutrition-overview .macro-value { font-size:1.5rem; overflow-wrap:anywhere; }
.nutrition-summary-compact .macro-value small { display:block; font-size:.8125rem; }
.nutrition-summary-compact .macro-partial { font-size:.75rem; color:var(--muted); }
.nutrition-summary-meta { grid-column:1 / -1; border-top:1px solid var(--border); padding-top:12px; }
.nutrition-summary-compact .nutrition-day-state { margin:0; font-size:.8125rem; color:var(--muted); }
.nutrition-summary-meta .energy-caption { margin:4px 0 0; line-height:1.45; }
.journal-options > summary, .food-date-control > summary, .meal-name-details > summary, .batch-filter > summary { min-height:44px; padding:10px 0; cursor:pointer; font-size:.875rem; }
.nutrition-panel + .nutrition-meals { margin-top:16px; }
.batch-food-row.is-choice { grid-template-columns:minmax(0,1fr) auto; padding:6px 0; min-height:52px; }
.batch-food-row .checkbox { padding:6px 0; border:0; background:none; min-height:44px; }
.batch-food-row.is-choice > small { font-size:.8125rem; color:var(--muted); }
.batch-basket { border:1px solid var(--border); border-radius:10px; padding:12px; margin:12px 0 18px; background:var(--surface); }
.batch-basket h3 { font-size:1rem; }
.batch-food-row.is-selected .btn { grid-column:1/-1; justify-content:flex-start; }
.sheet .form-footer.batch-footer { display:grid; gap:6px; }
.batch-footer .form-live-total { margin:0; padding:0; border:0; background:none; font-size:.875rem; }
.batch-footer > p { margin:0; font-size:.8125rem; }
.nutrition-form-footer [data-meal-recap] { flex-basis:100%; margin:0; font-size:.8125rem; }
.nutrition-form-footer { flex-wrap:wrap; }
@media(min-width:760px){ .nutrition-panel + .nutrition-meals { margin-top:0; } }


/* Parcours fréquents · lot frontend 1. DOM order matches the phone reading/focus order. */
.nutrition-add-actions { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:stretch; margin:0 0 14px; }
.route-nutrition .nutrition-add-actions .nutrition-toolbar { min-width:0; max-width:none; margin:0; }
.nutrition-add-actions .btn { min-width:0; min-height:48px; white-space:normal; line-height:1.35; }
.nutrition-add-actions .nutrition-batch-open { padding-inline:12px; }
.nutrition-key { margin:4px 0 10px; font-size:.8125rem; line-height:1.45; color:var(--muted); }
.nutrition-key>summary { min-height:44px; padding:11px 0; cursor:pointer; color:var(--text); font-weight:600; }
.nutrition-key>p { margin:0; padding:0 0 10px; }
.nutrition-key>summary:focus-visible, .meal-more>summary:focus-visible { outline:2px solid var(--accent); outline-offset:3px; border-radius:4px; }
.meal-actions { align-items:start; }
.meal-actions>.btn { min-height:44px; }
.meal-more { min-width:0; margin-left:auto; font-size:.8125rem; }
.meal-more>summary { min-height:44px; padding:12px 3px; cursor:pointer; font-weight:600; color:var(--text); }
.meal-more[open] { grid-column:1 / -1; margin-left:0; }
.meal-more-content { padding:8px 0 0; }
.meal-more-content .btn { white-space:normal; overflow-wrap:anywhere; }
.meal-more-content>p { margin:8px 0 0; }
@media (max-width:360px) {
  .nutrition-add-actions { grid-template-columns:minmax(0,1fr); gap:4px; }
  .nutrition-add-actions .nutrition-batch-open { justify-self:start; min-height:44px; padding-inline:0; border:0; }
}


/* Dated planning: one destination per recorded session, with text that wraps on phones. */
.planning-period { margin:16px 0 4px; line-height:1.6; }
.planning-rest { flex-wrap:wrap; }
.program-grid .planning-rest > span:first-of-type { flex:1 1 120px; min-width:0; }
.program-grid .planning-rest > span:last-of-type { flex:1 1 130px; margin-left:0; text-align:right; }
.planning-records { display:grid; gap:6px; margin-top:8px; }
.planning-records .planning-record { width:100%; min-width:0; min-height:48px; margin:0; padding:10px 0; justify-content:space-between; gap:10px; text-align:left; white-space:normal; border:0; border-top:1px solid var(--border); border-radius:0; background:transparent; }
.planning-record > span { min-width:0; }
.planning-record strong, .planning-record small { display:block; overflow-wrap:anywhere; }
.planning-record strong { color:var(--text); font-size:.9375rem; line-height:1.4; }
.planning-record small { margin-top:3px; color:var(--muted); font-size:.8125rem; line-height:1.5; }
.planning-record > svg { flex-shrink:0; }
.planning-record:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.program-grid .plan-card .planning-warning { color:var(--text); font-weight:600; }
.calendar-day { align-items:flex-start; }
.calendar-date { padding-top:3px; flex-shrink:0; }
.calendar-body :is(h2,h3), .calendar-body p, .program-grid .plan-card :is(h2,h3), .planning-rest { overflow-wrap:anywhere; }
.calendar-body > .planning-records:first-child { margin-top:0; }
.calendar-body > .planning-records:first-child > .planning-record:first-child { border-top:0; padding-top:0; }
.calendar-body .text-btn { min-height:44px; white-space:normal; text-align:left; justify-content:flex-start; }


/* Progress drill-down: units stay visible and secondary records remain reachable. */
.pg-chart-unit { display:block; margin:10px 0 0; color:var(--muted); font-size:.8125rem; line-height:1.5; }
.pg-extra-records { margin-top:10px; }
.pg-extra-records > summary { min-height:44px; padding:12px 0; color:var(--accent); cursor:pointer; font-size:.875rem; font-weight:650; }
.pg-extra-records > summary:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.pg-extra-records .pg-records { margin-top:8px; }
.pg-chips { flex-wrap:wrap; }
.pg-chips .pg-chip { max-width:100%; white-space:normal; overflow-wrap:anywhere; min-height:44px; }


/* Settings navigation: separate frequent tasks from setup and profile security. */
.profile-actions .btn { white-space:normal; overflow-wrap:anywhere; }
.masthead-actions>[data-action="settings"] { border:1px solid var(--control-border); background:var(--surface); color:var(--text); border-radius:50%; }
.masthead-actions>[data-action="settings"]:hover { background:var(--selected); color:var(--accent); }
.settings-hub { display:grid; gap:22px; }
.settings-hub .settings-copy { min-width:0; display:grid; gap:3px; }
.settings-hub .settings-copy strong { font-size:.9375rem; font-weight:700; line-height:1.35; }
.settings-hub .settings-copy small { margin:0; font-size:.8125rem; line-height:1.4; color:var(--muted); }
.settings-hub .settings-copy :is(strong,small) { overflow-wrap:anywhere; }
.settings-profile { display:flex; align-items:center; gap:14px; padding:16px; border:1px solid var(--border); border-radius:16px; background:var(--surface-2); color:var(--text); text-align:left; width:100%; }
.settings-profile .profile-avatar { width:46px; height:46px; flex-shrink:0; font-size:1.25rem; }
.settings-profile .settings-copy { flex:1; }
.settings-profile>svg { flex-shrink:0; color:var(--muted); }
.settings-section>h3 { font-size:.75rem; font-weight:750; color:var(--muted); margin:0 0 8px 4px; letter-spacing:.045em; text-transform:uppercase; }
.settings-card { border:1px solid var(--border); border-radius:14px; overflow:hidden; background:var(--surface); }
.settings-row { display:flex; align-items:center; gap:12px; min-height:70px; width:100%; border:0; border-radius:0; padding:13px 14px; text-align:left; background:var(--surface); color:var(--text); }
.settings-row+.settings-row { border-top:1px solid var(--border); }
.settings-row:hover,.settings-profile:hover { background:var(--selected); }
.settings-row .settings-copy { flex:1; }
.settings-symbol { display:grid; place-items:center; width:36px; height:36px; flex-shrink:0; border-radius:10px; color:var(--accent); background:var(--selected); }
.settings-row>svg:last-child { flex-shrink:0; color:var(--muted); }
.settings-row:focus-visible,.settings-profile:focus-visible { outline:2px solid var(--focus); outline-offset:-3px; }
.settings-back { margin:-4px 0 12px; padding-left:0!important; justify-content:flex-start; }
.settings-admin-link { color:var(--muted); justify-self:center; margin-top:-10px; }
.appearance-picker { margin:0; padding:0; border:0; min-width:0; }
.appearance-picker legend { font-size:1rem; font-weight:750; margin-bottom:12px; }
.appearance-picker>div { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.appearance-choice { position:relative; min-width:0; cursor:pointer; }
.appearance-choice input { position:absolute; width:1px; height:1px; opacity:0; margin:0; }
.appearance-choice>span { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; min-height:100px; border:1px solid var(--control-border); border-radius:12px; color:var(--muted); background:var(--surface); }
.appearance-choice strong { font-size:.8125rem; font-weight:650; }
.appearance-choice input:checked+span { border-color:var(--accent); background:var(--selected); color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.appearance-choice input:focus-visible+span { outline:2px solid var(--focus); outline-offset:3px; }
.settings-toggle { position:relative; display:flex; align-items:center; gap:14px; padding:16px; min-height:78px; cursor:pointer; }
.settings-toggle+.settings-toggle { border-top:1px solid var(--border); }
.settings-toggle>span:first-child { flex:1; min-width:0; }
.settings-toggle strong { display:block; font-size:.9375rem; line-height:1.4; }
.settings-toggle small { display:block; font-size:.8125rem; line-height:1.4; margin-top:4px; }
.settings-toggle input { position:absolute; width:1px; height:1px; opacity:0; margin:0; }
.settings-switch { display:block; position:relative; width:42px; height:26px; flex-shrink:0; border-radius:20px; background:var(--muted); }
.settings-switch:after { content:''; position:absolute; width:20px; height:20px; left:3px; top:3px; border-radius:50%; background:#fff; }
.settings-toggle input:checked+.settings-switch { background:var(--accent-fill); }
.settings-toggle input:checked+.settings-switch:after { transform:translateX(16px); }
.settings-toggle input:focus-visible+.settings-switch { outline:2px solid var(--focus); outline-offset:4px; }
.settings-footnote { font-size:.8125rem; color:var(--muted); line-height:1.5; margin:0; }
@media(max-width:360px){.settings-row{padding:12px;gap:9px;}.settings-hub{gap:18px;}.appearance-picker>div{gap:6px;}.appearance-choice strong{font-size:.75rem;}}
.profile-pin-removal { margin-top:18px; border-block:1px solid var(--border); padding-bottom:4px; }
.sheet form[data-profile-id] .form-footer { position:static; bottom:auto; margin-bottom:0; padding-bottom:0; }

/* DEV61: program ordering and personal progress. Component rules live here;
   palettes remain in app.css, structural layout in evolution.css. */
.rx-list-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:2px; min-width:92px; max-width:188px; }
.rx-list-actions .icon-btn { min-width:44px; min-height:44px; }
.rx-list-actions .icon-btn:disabled { opacity:.4; cursor:default; }
.pg-personalize { margin:0 0 16px; border:1px solid var(--border); border-radius:12px; padding:0 14px 12px; }
.pg-personalize > summary { min-height:44px; padding:12px 0; cursor:pointer; font-size:.875rem; font-weight:650; }
.pg-personalize:not([open]) { padding-bottom:0; }
.pg-personalize select, .weight-comparison select { max-width:100%; white-space:normal; }
.measurement-line { fill:none; stroke:var(--accent); stroke-width:1.5; }
.workout-term-help { margin-top:10px; font-size:.8125rem; line-height:1.5; }
.workout-term-help > summary { min-height:44px; padding:12px 0; cursor:pointer; color:var(--text); }
.workout-term-help dl { margin:8px 0; }
.workout-term-help dt { font-weight:700; color:var(--text); }
.workout-term-help dd { margin:2px 0 12px; color:var(--muted); }
.week-adapt-review { margin:16px 0; }
.week-adapt-review .btn { white-space:normal; }
.adapt-change-table { display:grid; gap:10px; padding:0; list-style:none; }
.adapt-change-table li { border:1px solid var(--border); border-radius:10px; padding:12px; overflow-wrap:anywhere; }
.adapt-change-table span { display:block; font-size:.8125rem; color:var(--muted); margin-top:4px; }
.shared-summary { margin:12px 0; }
.shared-summary > summary { min-height:44px; padding:12px 0; cursor:pointer; font-weight:650; }
/* Lot 4: clear entry points and local explanations. */
.today-exercises > summary, .today-nutrition-key > summary { min-height:44px; padding:12px 0; cursor:pointer; font-size:.8125rem; }
.today-checks { margin-top:24px; }
.pg-shortcuts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:8px 0 18px; }
.pg-shortcuts a { display:flex; align-items:center; justify-content:space-between; gap:4px; min-height:48px; padding:10px; border:1px solid var(--border); border-radius:10px; color:var(--text); font-size:.8125rem; text-decoration:none; }
.pg-shortcuts a:hover { background:var(--surface); }
.pg-period-caption { font-size:.75rem; color:var(--muted); margin:12px 0 18px; }
.progress-v2 .pg-hero-num { flex-wrap:wrap; }
.progress-v2 .pg-unit { max-width:100%; white-space:normal; }
.pg-method p { font-size:.8125rem; line-height:1.6; margin:12px 0; }
.confirmation-facts { list-style:none; padding:0; display:grid; gap:8px; margin:18px 0; }
.confirmation-facts li { padding:12px; border:1px solid var(--border); border-radius:10px; overflow-wrap:anywhere; }
.confirmation-facts strong, .confirmation-facts span { display:block; }
.confirmation-facts strong { font-size:.75rem; color:var(--muted); margin-bottom:4px; }
.edition-scope { border-left:3px solid var(--accent); padding:8px 12px; margin:8px 0 20px; }
.edition-scope strong { display:block; font-size:.8125rem; }
.edition-scope p { margin:6px 0; }
.form-save-status { color:var(--muted); font-size:.75rem; line-height:1.5; margin:8px 0 14px; }
.form-save-status[data-phase="error"] { color:var(--text); font-weight:650; }
.draft-differences { margin:10px 0; font-size:.8125rem; }
.draft-differences > summary { min-height:44px; padding:12px 0; cursor:pointer; }
.draft-differences table { width:100%; border-collapse:collapse; }
.draft-differences th, .draft-differences td { padding:8px; text-align:left; vertical-align:top; border-bottom:1px solid var(--border); overflow-wrap:anywhere; min-width:90px; max-width:260px; }
[data-draft-offer] { margin-bottom:18px; padding:14px; border:1px solid var(--border); border-radius:12px; }
[data-setup-list] .settings-link > span { display:grid; gap:5px; min-width:0; white-space:normal; }
[data-setup-list] .settings-link small { color:var(--muted); font-size:.75rem; }
.draft-value-list dt { font-size:.75rem; color:var(--muted); margin-top:12px; }
.draft-value-list dd { margin:3px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:480px) { .edit-item:has(.rx-list-actions) { align-items:flex-start; } .rx-list-actions { max-width:92px; } }

/* dev.89 · interface fixes (Intervenant 3). */
.workout-focus .focus-offline { color: var(--danger); font-weight: 600; }
.control-state.is-default { color: var(--muted); font-weight: 500; }
.set-context-link.is-attention, .set-context-link.is-attention .control-state { color: var(--danger); }
.workout-context-needed { margin: 0 0 10px; font-size: .8125rem; line-height: 1.45; color: var(--danger); font-weight: 600; }
.workout-last.is-empty { padding-top: 6px; padding-bottom: 6px; }
.workout-last.is-empty .workout-last-empty { margin: 0; }
.workout-set-form > .spaced { margin-top: 8px; }
.workout-set-form .workout-target { margin-bottom: 8px; }
/* U-12: with the keyboard open, a nutrition entry keeps its two actions on one sticky row (recap hidden). */
html[data-compact-viewport="true"] .sheet:has(form[data-input="food-calc"], form[data-input="quick-food-calc"]) .form-footer { position: sticky; bottom: 0; margin: 12px 0 0; padding: 8px 0 max(8px,var(--safe-bottom)); grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; }
html[data-compact-viewport="true"] .nutrition-form-footer [data-meal-recap] { display: none; }
html[data-compact-viewport="true"] .nutrition-form-footer .btn { min-height: 48px; }
/* U-15: with the sidebar, the masthead keeps its profile and settings actions on the right. */
@media (min-width: 760px) { .masthead-actions { margin-left: auto; } }
/* U-09: enlarged text or 200 % zoom. Nav labels stay whole and inside their tab (capped to the tab width),
   the week facts reflow instead of overflowing, and the masthead fits a 195 px wide layout. */
@media (max-width: 759px) { .bottom-nav .nav-link>span:last-child { font-size: min(.8125rem, 5vw); white-space: normal; overflow-wrap: normal; } }
.today-week .week-facts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 5rem), 1fr)); }
.today-macros { grid-template-columns: repeat(auto-fit, minmax(min(100%, 4rem), 1fr)); }
.workout-focus .workout-set-form { grid-template-columns: minmax(0,1fr); }
@media (max-width: 17.5em) { .route-today .week-rail { grid-template-columns: repeat(4, minmax(0,1fr)); row-gap: 4px; } }
@media (max-width: 15em) {
  .content { padding-left: 16px; padding-right: 16px; }
  .masthead { gap: 8px; }
  .masthead .brand { gap: 0; }
  .bloc-wordmark { width: 56px; }
  .masthead-actions { gap: 4px; }
  .workout-control .workout-stepper:not(.no-step) { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .workout-control .workout-stepper:not(.no-step) .stepper-value { grid-column: 1 / -1; grid-row: 1; min-height: 56px; border-bottom: 1px solid color-mix(in srgb, var(--control-border) 50%, var(--surface)); }
  .workout-control .workout-stepper:not(.no-step) .stepper-button { min-height: 44px; }
  .quantity-stepper { grid-template-columns: 44px minmax(0,1fr) auto 44px; gap: 4px; }
  .quantity-stepper>button { min-width: 44px; height: 44px; }
  .quantity-stepper input { height: 44px; }
  .nutrition-form-footer .btn { padding-left: 6px; padding-right: 6px; }
  .nutrition-form-footer .btn svg { display: none; }
}

/* ===== Nutrition DEV90 · one screen to read the day, one gesture to add ===== */
.chip-row { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.btn.chip, .chip-btn { display:inline-flex; align-items:center; gap:6px; min-height:44px; min-width:44px; padding:8px 14px; border:1px solid var(--border); border-radius:999px; background:var(--surface); color:var(--text); font-size:var(--type-label); font-weight:650; line-height:1.2; text-align:left; box-shadow:none; }
.btn.chip svg, .chip-btn svg { color:var(--accent); flex-shrink:0; }
.btn.chip:hover, .chip-btn:hover { border-color:var(--accent-fill); }
.chip-btn[aria-pressed="true"] { background:var(--accent-fill); border-color:var(--accent-fill); color:var(--on-accent); }
.btn.danger-text { min-height:44px; padding:9px 2px; background:none; border:0; color:var(--danger); font-size:var(--type-label); font-weight:700; display:inline-flex; align-items:center; gap:6px; }
.meal-choice { border:0; margin:14px 0 6px; padding:0; min-width:0; }
.meal-choice legend { padding:0; margin-bottom:8px; font-size:var(--type-label); font-weight:700; color:var(--text); }
.chip-radio { position:relative; display:inline-flex; }
.chip-radio input { position:absolute; inset:0; opacity:0; margin:0; cursor:pointer; }
.chip-radio span { display:inline-flex; align-items:baseline; gap:6px; min-height:44px; padding:10px 14px; border:1px solid var(--border); border-radius:999px; background:var(--surface); color:var(--text); font-size:var(--type-label); font-weight:650; line-height:1.2; }
.chip-radio small { font-size:.75rem; color:var(--muted); font-weight:500; }
.chip-radio input:checked + span { background:var(--accent-fill); border-color:var(--accent-fill); color:var(--on-accent); }
.chip-radio input:checked + span small { color:var(--on-accent); opacity:.85; }
.chip-radio input:focus-visible + span { outline:2px solid var(--focus); outline-offset:2px; }
.food-date-control { margin-top:4px; }
.food-date-control > summary { font-size:var(--type-label); color:var(--muted); }

/* Gauges shared with the Today card. A partial bar is hatched; above the target turns amber, never red. */
.ng { display:grid; gap:14px; }
.ng-energy-line { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 10px; }
.ng-label { font-size:var(--type-small); color:var(--muted); font-weight:600; }
.ng-energy-line .ng-label { flex-basis:100%; }
.ng-kcal { font-size:2.1rem; line-height:1.05; font-weight:750; letter-spacing:-.04em; color:var(--text); }
.ng-kcal small, .ng-value small { font-size:.8125rem; font-weight:550; color:var(--muted); letter-spacing:0; }
.ng-rest { margin-left:auto; font-size:var(--type-label); font-weight:700; color:var(--accent); }
.ng-over .ng-rest { color:var(--chart-alt); }
.ng-bar { display:block; height:6px; border-radius:999px; background:var(--surface-2); overflow:hidden; margin-top:6px; }
.ng-bar-lg { height:9px; margin-top:10px; }
.ng-bar > span { display:block; height:100%; border-radius:inherit; background:var(--accent-fill); transition:width .25s ease; }
.ng-over .ng-bar > span { background:var(--chart-alt); }
.ng-partial .ng-bar > span { background:repeating-linear-gradient(135deg,var(--accent-fill) 0 5px,transparent 5px 8px); opacity:.75; }
.ng-macros { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.ng-macro { min-width:0; display:flex; flex-direction:column; }
.ng-value { font-size:1.0625rem; font-weight:750; color:var(--text); white-space:nowrap; }
.ng-state { margin-top:4px; font-size:.75rem; color:var(--muted); }
.ng-partial .ng-state { color:var(--chart-alt); font-weight:650; }
.ng-note { margin:12px 0 0; font-size:var(--type-small); line-height:1.45; color:var(--muted); }
.today-nutrition .ng { padding:2px 0 4px; }
.today-nutrition-note { color:var(--muted); }

/* Journal */
.route-nutrition .page-top { align-items:center; margin-bottom:14px; }
.route-nutrition .page-top > .nv-library { margin-left:auto; }
.nv-past { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:-12px 0 14px; padding:4px 4px 4px 14px; border-radius:999px; background:var(--selected); font-size:var(--type-small); color:var(--text); }
.nv-past .btn { min-height:40px; padding:6px 10px; }
.nutrition-summary.nv-summary { padding:16px; border:1px solid var(--border); border-radius:16px; background:var(--surface); margin:0 0 12px; }
.nv-issues { display:flex; align-items:center; gap:8px; margin-top:12px; padding-top:10px; border-top:1px solid var(--border); font-size:var(--type-small); color:var(--text); }
.nv-issues > svg { color:var(--chart-alt); flex-shrink:0; }
.nv-issues > span { flex:1; min-width:0; }
.nv-issues .btn { min-height:40px; padding:6px 2px; white-space:nowrap; }
.nv-capture-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-bottom:18px; }
.nv-capture-actions .btn { min-width:0; padding-inline:8px; font-size:.875rem; white-space:normal; }
.nv-summary + .nv-quick { margin-top:16px; }
.nv-empty-slots { padding:16px 0; }
.nv-empty-slots>p { margin:0 0 8px; font-size:.8125rem; color:var(--muted); }
.nv-empty-slots>div { display:flex; flex-wrap:wrap; gap:8px; }
.nv-tools-menu { margin-top:16px; border-top:1px solid var(--border); font-size:.875rem; color:var(--muted); }
.nv-tools-menu .nv-tools { margin-top:0; padding-top:0; border:0; }
.picker-more { width:100%; font-size:.8125rem; }
.picker-more>summary { color:var(--muted); }
.label-photo-guide { border:1px dashed var(--control-border); border-radius:16px; padding:28px 20px; margin:10px 0 20px; text-align:center; }
.label-photo-guide>svg { color:var(--accent); margin-bottom:12px; }
.label-photo-guide h3 { margin:0 0 8px; }
.label-photo-guide p,.scan-source-note { color:var(--muted); font-size:.875rem; line-height:1.5; }
[data-label-status] { color:var(--text); font-size:.9375rem; }
.nv-state { display:flex; align-items:center; gap:6px; margin:12px 0 0; font-size:var(--type-small); color:var(--muted); font-weight:650; }
.nv-add { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; margin:0 0 8px; }
.nv-add .btn { min-height:54px; justify-content:center; gap:8px; }
.nv-quick { margin:0 0 18px; }
.nv-quick .picker-heading { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:8px; }
.nv-quick .picker-heading h2 { margin:0; font-size:1rem; }
.nv-quick .picker-heading span { font-size:.75rem; color:var(--muted); }
.nv-quick-row { display:flex; gap:8px; overflow-x:auto; scroll-snap-type:x proximity; padding:2px 2px 6px; margin:0 -2px; scrollbar-width:none; }
.nv-quick-row::-webkit-scrollbar { display:none; }
.nv-quick .nutrition-quick-item { flex:0 0 auto; scroll-snap-align:start; display:grid; grid-template-columns:auto minmax(0,1fr); column-gap:6px; align-items:center; min-height:56px; max-width:190px; padding:8px 12px 8px 10px; border:1px solid var(--border); border-radius:14px; background:var(--surface); color:var(--text); text-align:left; }
.nv-quick .nutrition-quick-item svg { grid-row:span 2; color:var(--accent); }
.nv-quick .nutrition-quick-item strong { font-size:var(--type-label); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nv-quick .nutrition-quick-item span { font-size:.75rem; color:var(--muted); white-space:nowrap; }
.nv-quick .nutrition-quick-item:hover { border-color:var(--accent-fill); }
.nv-meals { display:grid; gap:10px; align-content:start; }
.route-nutrition .nv-meal { padding:6px 14px 4px; border:1px solid var(--border); border-radius:16px; background:var(--surface); }
.route-nutrition .nv-meal-head { display:flex; align-items:center; gap:8px; padding:6px 0 4px; }
.nv-meal-head > div { flex:1; min-width:0; }
.route-nutrition .nv-meal-head h2 { margin:0; font-size:1.0625rem; line-height:1.35; }
.nv-meal-head small { display:block; color:var(--muted); font-size:.75rem; }
.nv-meal-kcal { font-size:1rem; font-weight:750; white-space:nowrap; }
.nv-meal-kcal small { font-size:.75rem; color:var(--muted); font-weight:550; }
.nv-meal-head .icon-btn { margin-right:-8px; color:var(--muted); }
.route-nutrition .nv-meal .food-entry { position:relative; display:block; padding:0; border-top:1px solid var(--border); border-bottom:0; overflow:hidden; }
.nv-entry { position:relative; z-index:1; display:flex!important; align-items:center; gap:10px; width:100%; min-height:52px; padding:8px 0!important; background:var(--surface)!important; transform:translateX(var(--swipe,0)); transition:transform .18s ease; }
.food-entry.swiping .nv-entry { transition:none; }
.food-entry.swiped .nv-entry { transform:translateX(var(--swipe,-108px)); }
.nv-entry-main { flex:1; min-width:0; display:flex!important; flex-direction:column; }
.nv-entry .food-name { font-size:.9375rem; font-weight:650; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nv-entry-main small { font-size:.75rem; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nv-entry-main .nv-warn { color:var(--chart-alt); font-weight:650; }
.nv-entry-kcal { flex-shrink:0; font-size:.9375rem; font-weight:700; white-space:nowrap; }
.nv-entry-kcal small { font-size:.75rem; color:var(--muted); font-weight:500; }
.nv-entry .prep-entry-photo { width:40px; height:40px; border-radius:10px; object-fit:cover; flex-shrink:0; }
.nv-entry-delete { position:absolute; inset:0 0 0 auto; width:108px; display:flex; align-items:center; justify-content:center; gap:6px; border:0; background:var(--danger-fill); color:#fff; font-size:var(--type-label); font-weight:700; }
.nv-meal-foot { display:flex; border-top:1px solid var(--border); margin:0; padding:2px 0; }
.nv-meal-foot .btn { gap:6px; }
.nv-meal-empty { margin:6px 0 10px; }
.nv-tools { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 4px; }
@media (min-width: 760px) {
  .nv-layout { align-items:start; }
  .route-nutrition .nv-side { position:sticky; top:16px; border-right:0; padding-right:0; }
  .nv-meals { margin-top:0; }
}

/* Add sheet */
.sheet-content.food-picker-sheet { min-height:min(72vh,680px); }
.picker-target { margin:0 0 12px; }
.picker-target .chip-row { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; padding-bottom:2px; }
.picker-target .chip-row::-webkit-scrollbar { display:none; }
.picker-target .chip-radio span { white-space:nowrap; }
.food-search-row { display:grid; grid-template-columns:minmax(0,1fr) 52px; gap:8px; align-items:end; }
.food-search-row .field { margin:0; }
.food-search-row .food-search-scan { min-height:52px; padding:0; justify-content:center; color:var(--accent); }
.food-picker-tools.chip-row { margin:14px 0 6px; }
.food-picker-tools .btn.chip { min-height:40px; padding:6px 12px; }
.food-picker-section { margin-top:16px; }
.food-picker-section h3 { font-size:.9375rem; margin:0 0 6px; }
.food-picker-section .picker-heading { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.food-picker-section .picker-heading span { font-size:.75rem; color:var(--muted); }
.food-result-row { display:flex; align-items:center; gap:8px; }
.food-result-row .food-list-item { flex:1; min-width:0; }
.food-quick-add { flex:0 0 44px; width:44px; height:44px; display:grid; place-items:center; border:0; border-radius:50%; background:var(--surface-2); color:var(--accent); }
.food-quick-add:hover, .food-quick-add:focus-visible { background:var(--accent-fill); color:var(--on-accent); }
.food-picker-empty { margin:14px 0 4px; color:var(--muted); font-size:var(--type-label); }
.food-picker-outside { padding-top:12px; border-top:1px solid var(--border); }
.food-picker-outside .chip-row { margin-top:8px; }
.off-result { margin-top:6px; }
.quantity-presets { margin-top:10px; }
.quantity-presets .chip-btn { min-height:40px; padding:6px 12px; }
.consume-food-summary { display:flex; flex-direction:column; gap:2px; margin:4px 0 14px; color:var(--muted); font-size:var(--type-label); }
.preview-after { color:var(--accent); font-weight:650; }
.nutrient-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 12px; }
.nutrient-hint { margin-top:-4px; }
.nutrition-form-buttons { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; width:100%; }
.nutrition-form-buttons .btn { justify-content:center; }
.nutrition-form-footer { flex-direction:column; align-items:stretch; gap:6px; }
.nutrition-form-footer [data-meal-recap] { margin:0; }
.entry-secondary-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-top:8px; }
.meal-sheet-actions { margin:0 0 14px; }
.nutrition-gap-entries { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.nutrition-gap-row { flex-direction:column; align-items:stretch!important; }
.library-tools { margin:0 0 6px; }
.library-templates { margin-top:12px; }

/* Live barcode scan */
.live-scan { position:relative; aspect-ratio:4/3; border-radius:16px; overflow:hidden; background:#0b0d12; }
.live-scan video { width:100%; height:100%; object-fit:cover; display:block; }
.live-scan-frame { position:absolute; inset:27% 8%; border:2px solid #ffffffd9; border-radius:12px; box-shadow:0 0 0 999px #0009; pointer-events:none; }
.live-scan-frame span { position:absolute; left:6%; right:6%; top:50%; height:2px; background:#ff5c6c; box-shadow:0 0 8px #ff5c6c; animation:live-scan 1.6s ease-in-out infinite alternate; }
.live-scan[data-unavailable="true"] .live-scan-frame { display:none; }
@keyframes live-scan { from { transform:translateY(-34px); } to { transform:translateY(34px); } }
.live-scan-status { margin:10px 0; font-size:var(--type-label); }
.live-scan:not([data-torch="available"]) ~ .live-scan-tools .live-scan-torch { display:none; }
.live-scan-torch[aria-pressed="true"] { background:var(--accent-fill); color:var(--on-accent); border-color:var(--accent-fill); }
.live-scan-torch[aria-pressed="true"] svg { color:var(--on-accent); }

/* PrepMyMeal: the three macros on every card */
.prep-card .prep-macros { display:flex!important; flex-wrap:wrap; gap:4px 10px; }
.prep-card .prep-macros > span { display:flex!important; flex-direction:row!important; gap:4px; align-items:baseline; }
.prep-card-choose { display:inline-flex; align-items:center; gap:4px; color:var(--accent); font-weight:700; }
.prep-context { background:none!important; padding:0!important; color:var(--muted); font-size:var(--type-small); }

/* Undo in the message */
.toast.with-action { pointer-events:auto; display:flex; align-items:center; justify-content:space-between; gap:12px; padding-right:8px; }
.toast-action { min-height:44px; padding:0 12px; border:0; border-radius:10px; background:transparent; color:inherit; font:inherit; font-weight:800; text-decoration:underline; text-underline-offset:3px; }
@media (prefers-reduced-motion: reduce) { .nv-entry, .ng-bar > span { transition:none; } .live-scan-frame span { animation:none; } }
@media (max-width: 360px) {
  .ng-macros { gap:8px; }
  .ng-value { font-size:.9375rem; }
  .nutrition-form-buttons { grid-template-columns:1fr; }
}
.batch-food-row .checkbox { margin:0; }
.batch-food-row.is-choice { padding:2px 0; min-height:48px; }
.batch-filter { margin:4px 0 8px; }
.batch-destination { margin-bottom:8px; }
.nv-meal-kcal small, .nv-entry-kcal small { display:inline; margin-left:2px; }
.route-nutrition .nv-quick { border:0; padding:0; }
.food-picker-tools.chip-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; gap:8px; padding:0; margin:14px 0 6px; }
.food-picker-tools .btn.chip { min-height:44px; white-space:normal; justify-content:center; }
.food-picker-tools .picker-more { grid-column:1 / -1; }
.sheet .nutrition-form-footer { display:flex!important; flex-direction:column; align-items:stretch; gap:6px; }
.sheet .nutrition-form-buttons .btn { white-space:nowrap; min-height:52px; }
@media (max-width: 340px) { .sheet .nutrition-form-buttons .btn { white-space:normal; } }
.nutrition-review-sheet .nutrition-gap-row { display:block!important; padding:12px 0; }
.nutrition-review-sheet .nutrition-gap-entries .btn.chip { min-width:0; width:auto; min-height:40px; padding:6px 12px; }
.nutrition-review-sheet .nutrition-gap-entries .btn.chip small { display:inline; margin:0; }
.meal-sheet-actions.chip-row { flex-direction:row; }
.live-scan[data-unavailable="true"] { display:none; }
.route-nutrition .food-entry .nv-entry-delete { width:108px; min-height:0; padding:0; background:var(--danger-fill); color:#fff; text-align:center; justify-content:center; }

/* ===== DEV91 · séance, programme, accueil, progrès et saisies rapides ===== */
/* Workout: one-tap loads, standard in two buttons, compact rest. */
.load-choices { display:flex; flex-wrap:wrap; gap:8px; margin:0; }
.load-choice { display:grid; justify-items:start; gap:1px; min-height:48px; min-width:84px; padding:6px 12px; border:1px solid var(--border); border-radius:12px; background:var(--surface); color:var(--text); text-align:left; cursor:pointer; }
.load-choice small { font-size:.75rem; line-height:1rem; color:var(--muted); font-weight:550; }
.load-choice strong { font-size:1rem; line-height:1.25rem; font-weight:700; font-variant-numeric:tabular-nums; }
.load-choice.selected { background:var(--accent-fill); border-color:var(--accent-fill); color:var(--on-accent); }
.load-choice.selected small { color:var(--on-accent); opacity:.85; }
.load-choice:focus-visible, .standard-choice:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
.standard-control { display:grid; gap:6px; }
.standard-control .standard-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.standard-control .standard-choice { min-width:0; min-height:44px; padding:0 6px; border:0; border-radius:10px; background:var(--field); color:var(--text); font-size:.9375rem; font-weight:600; cursor:pointer; }
.standard-control .standard-choice.selected { background:var(--accent-fill); color:var(--on-accent); }
.standard-note { margin:0; font-size:.8125rem; line-height:1.125rem; color:var(--chart-alt); font-weight:600; }
.standard-note[hidden] { display:none; }
.set-context-link.is-attention, .set-context-link.is-attention .control-state { color:var(--chart-alt); }
.workout-focus .workout-rest.is-compact { position:static; display:grid; gap:4px; margin:8px 0 12px; padding:12px; border:1px solid var(--border); border-radius:14px; background:var(--surface); color:var(--text); }
.workout-rest.is-compact .rest-line { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.workout-rest.is-compact .rest-clock { display:grid; gap:3px; min-width:0; }
.workout-rest.is-compact .timer-status { margin:0; font-size:.8125rem; opacity:1; color:var(--muted); }
.workout-focus .workout-rest.is-compact .timer-value { margin:0; font-size:1.875rem; line-height:1.1; font-weight:750; letter-spacing:-.04em; text-align:left; color:var(--accent); }
.workout-rest.is-compact .rest-buttons { display:flex; gap:6px; flex:none; }
.workout-rest.is-compact .rest-buttons .btn { min-height:44px; min-width:44px; padding:6px 8px; border:1px solid var(--border); border-radius:10px; background:var(--surface-2); color:var(--text); font-size:.8125rem; font-weight:650; }
.workout-rest.is-compact .rest-after { margin:4px 0 0; font-size:.8125rem; opacity:1; color:var(--muted); }
.workout-rest.is-compact .rest-next { margin:2px 0 0; padding:6px 0 0; }
.workout-rest.is-compact .rest-settings summary { min-height:44px; padding:10px 0; font-size:.8125rem; color:var(--muted); }
.workout-rest.is-compact .rest-settings .btn { color:var(--text); background:var(--surface-2); }
.workout-rest.is-compact .rest-next :is(span,strong) { color:var(--text); }
.workout-set-form.is-prep { border-top:0; }
.workout-menu-item strong { display:grid; gap:2px; }
.workout-menu-item strong small { color:var(--muted); font-weight:500; font-size:.75rem; }
.workout-menu-actions .btn { white-space:normal; overflow-wrap:anywhere; }
/* Finished session: each exercise visible with its comparison. */
.summary-exercises { display:grid; gap:10px; margin:18px 0 8px; }
.summary-exercise-card { padding:12px 14px; border:1px solid var(--border); border-radius:12px; background:var(--surface); }
.summary-exercise-head { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.summary-exercise-head h3 { margin:0; font-size:1rem; line-height:1.375rem; }
.summary-exercise-head .tag { flex:none; }
.summary-digest { margin:4px 0 0; font-size:1.0625rem; font-weight:700; font-variant-numeric:tabular-nums; }
.summary-compare { margin:2px 0 0; font-size:.8125rem; color:var(--muted); }
.summary-delta { margin-left:4px; color:var(--text); }
.summary-delta.is-up { color:var(--accent); }
.summary-delta.is-down { color:var(--chart-alt); }
.summary-exercise-card .summary-exercise { margin:6px 0 0; border:0; }
.summary-exercise-card .summary-exercise > summary { min-height:40px; font-size:.8125rem; color:var(--muted); }
.summary-warmup p { margin:0; font-size:.875rem; color:var(--muted); }
.row-link { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; min-height:56px; padding:10px 14px; border:1px solid var(--border); border-radius:12px; background:var(--surface); color:var(--text); text-align:left; cursor:pointer; }
.row-link > span { display:grid; gap:2px; min-width:0; }
.row-link small { font-size:.8125rem; color:var(--muted); font-weight:500; }
.row-link strong { font-size:.9375rem; }
.row-link svg { flex:none; color:var(--muted); }
.program-shared { margin-top:18px; }
/* Programme: a planned day is one touch target. */
.plan-card-body { display:grid; gap:8px; min-width:0; }
.plan-card-main { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:8px; row-gap:2px; width:100%; padding:0; border:0; background:none; color:var(--text); text-align:left; cursor:pointer; }
.plan-card-main > :not(svg) { grid-column:1; }
.plan-card-main > svg { grid-column:2; grid-row:1 / span 5; align-self:center; color:var(--muted); }
.plan-card-main .day-label { font-size:.8125rem; color:var(--muted); }
.plan-card-title { font-size:1.0625rem; line-height:1.4rem; font-weight:700; }
.plan-card-meta, .plan-card-load { font-size:.875rem; line-height:1.25rem; color:var(--muted); }
.plan-card-load { color:var(--text); font-variant-numeric:tabular-nums; }
.plan-card-main .planning-warning { font-size:.8125rem; }
.plan-card-main:focus-visible { outline:2px solid var(--focus); outline-offset:4px; border-radius:8px; }
.route-sessions .page-top .block-chip, .page-top .btn.chip.block-chip { flex:none; min-height:40px; padding:6px 12px; font-size:.8125rem; }
/* Calendar: month grid, selected day below. */
.month-nav { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:6px 0 8px; }
.month-nav h2 { margin:0; font-size:1.0625rem; font-weight:700; }
.month-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
.month-weekday { text-align:center; font-size:.75rem; color:var(--muted); padding:2px 0; }
.month-day { display:grid; justify-items:center; align-content:center; gap:2px; min-height:46px; padding:4px 0; border:0; border-radius:10px; background:none; color:var(--text); font-size:.9375rem; font-weight:600; font-variant-numeric:tabular-nums; cursor:pointer; }
.month-day i { display:grid; place-items:center; height:10px; color:var(--accent); font-style:normal; }
.month-day.is-planned i::after { content:""; width:6px; height:6px; border-radius:50%; background:var(--muted); }
.month-day.is-active i::after { content:""; width:7px; height:7px; border-radius:50%; background:var(--accent-fill); }
.month-day.is-rest, .month-day.is-outside { color:var(--muted); font-weight:500; }
.month-day.is-outside { opacity:.55; }
.month-day.is-today span { color:var(--accent); font-weight:800; }
.month-day.is-selected { background:var(--accent-fill); color:var(--on-accent); }
.month-day.is-selected span, .month-day.is-selected i { color:var(--on-accent); }
.month-day.is-selected.is-planned i::after { background:var(--on-accent); }
.month-day:focus-visible { outline:2px solid var(--focus); outline-offset:1px; }
.month-legend, .week-legend { display:flex; flex-wrap:wrap; align-items:center; gap:4px 14px; margin:8px 0 12px; font-size:.75rem; color:var(--muted); }
.month-legend span::before, .week-legend span::before { content:""; display:inline-block; width:6px; height:6px; margin-right:6px; border-radius:50%; background:var(--muted); vertical-align:middle; }
.month-legend .is-done::before, .week-legend .is-finished::before { content:"✓"; width:auto; height:auto; background:none; color:var(--accent); font-weight:800; }
.month-legend .is-active::before { background:var(--accent-fill); }
.month-legend .btn.text-btn { margin-left:auto; }
.route-today .week-legend { margin:6px 0 14px; }
.calendar-day > .eyebrow { margin:6px 0 4px; }
.calendar-day .calendar-plan { padding:10px 0; }
/* History: search key, best set. */
.history-search { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:8px; }
.history-search .field { margin:0; }
.history-search .history-search-go { min-width:48px; min-height:48px; }
.history-item .history-best { margin:2px 0 0; color:var(--text); font-size:.875rem; font-variant-numeric:tabular-nums; }
/* Planned session: start, options and one-touch proposal. */
.plan-start { display:grid; gap:2px; margin:12px 0; }
.plan-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin:18px 0 0; }
.plan-actions .footer-note { flex-basis:100%; margin:0; }
.proposal-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.proposal-actions .btn { min-height:44px; }
/* Today: visible exercises with their loads, explicit checks. */
.today-plan-list li > .today-plan-proposal { grid-column:1 / -1; }
.today-plan-proposal .proposal-actions { gap:6px; }
.today-plan-proposal .btn { min-height:40px; padding:6px 12px; font-size:.8125rem; }
.today-plan-proposal .btn.text-btn { padding:6px 2px; }
.today-plan-hint { color:var(--accent) !important; font-weight:600; }
.today-checks { margin-top:24px; padding:12px 14px; border:1px solid var(--border); border-radius:12px; background:var(--surface); }
.today-checks h2 { margin:0 0 4px; font-size:1rem; }
.today-check-row { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:44px; font-size:.875rem; }
.today-check-row + .today-check-row { border-top:1px solid var(--border); }
.route-today .today-dateline .block-link.block-chip { display:inline-flex; align-items:center; gap:6px; min-height:36px; margin:6px 0 12px; padding:4px 12px; border:1px solid var(--border); border-radius:999px; background:var(--surface); color:var(--text); font-size:.8125rem; font-weight:650; }
.route-today .today-dateline .block-link.block-chip svg { color:var(--accent); }
.onboarding .first-steps { display:grid; gap:0; margin:10px 0 12px; padding:0; list-style:none; counter-reset:step; }
.onboarding .first-steps li { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:48px; border-top:1px solid var(--border); counter-increment:step; }
.onboarding .first-steps li > span::before { content:counter(step) ". "; color:var(--muted); }
.onboarding .first-steps li.is-done > span { color:var(--muted); text-decoration:line-through; }
.onboarding .onboarding-links { display:flex; flex-wrap:wrap; gap:4px 16px; margin-top:4px; }
.onboarding > div > p { margin:4px 0 0; }
.ng-rest.ng-set-goal { padding:0; border:0; background:none; color:var(--accent); font:inherit; font-weight:650; cursor:pointer; text-decoration:underline; text-underline-offset:3px; min-height:44px; }
/* Progrès: every view in one row, readable week chart. */
.pg-shortcuts { display:flex; flex-wrap:nowrap; gap:8px; overflow-x:auto; scrollbar-width:none; margin:8px -2px 18px; padding:0 2px 2px; }
.pg-shortcuts::-webkit-scrollbar { display:none; }
.pg-shortcuts a { flex:0 0 auto; white-space:nowrap; min-height:44px; border-radius:999px; padding:8px 12px; }
.pg-legend { display:flex; flex-wrap:wrap; gap:4px 12px; margin:6px 0 0; font-size:.75rem; color:var(--muted); }
.pg-legend span::before { content:""; display:inline-block; width:10px; height:10px; margin-right:5px; border-radius:3px; vertical-align:-1px; }
.pg-legend .is-open::before { background:var(--accent); opacity:.55; }
.pg-legend .is-closed::before { background:var(--data-violet); }
.pg-legend .is-goal::before { height:0; border-top:2px dashed var(--text); opacity:.6; border-radius:0; vertical-align:3px; }
.pg-legend .is-protein::before { width:6px; height:6px; border-radius:50%; background:var(--data-teal); vertical-align:1px; }
.pg-personalize { margin-top:10px; }
/* Quick entries: steppers and chips. */
.health-stepper { display:grid; gap:6px; }
.health-stepper > span { font-size:var(--type-label); font-weight:650; }
.health-stepper .workout-stepper { display:grid; grid-template-columns:minmax(52px,64px) minmax(0,1fr) minmax(52px,64px); min-height:56px; overflow:hidden; border:1px solid var(--control-border, var(--border)); border-radius:12px; }
.health-stepper .stepper-button { min-width:0; border:0; border-radius:0; background:var(--field); color:var(--accent); font-size:.9375rem; font-weight:700; cursor:pointer; }
.health-stepper .stepper-value { display:flex; align-items:baseline; justify-content:center; gap:5px; background:var(--surface); }
.health-stepper .stepper-value input { width:6ch; min-width:0; padding:0 !important; border:0 !important; background:none !important; text-align:center; font-size:1.75rem !important; font-weight:650; font-variant-numeric:tabular-nums; }
.health-stepper .stepper-unit { color:var(--muted); font-weight:550; }
.btn.chip.weight-last, .chip.weight-last { margin:8px 0 4px; }
.choice-chips { margin:12px 0 0; padding:0; border:0; min-width:0; }
.choice-chips legend { padding:0; margin-bottom:6px; font-size:var(--type-label); font-weight:650; }
.choice-chips .chip-radio span { min-width:44px; justify-content:center; }
.choice-chips small { display:block; margin-top:4px; font-size:.75rem; color:var(--muted); }
/* Profile colours: full touch targets. */
.profile-colors .profile-color { display:grid; place-items:center; min-width:48px; min-height:48px; }
.profile-colors .profile-avatar.small { width:40px; height:40px; }
/* Sign-in: show the password, help visible. */
.password-wrap { position:relative; display:block; }
.password-wrap input { width:100%; padding-right:92px !important; }
.password-toggle { position:absolute; right:4px; top:50%; transform:translateY(-50%); min-height:40px; min-width:76px; padding:0 10px; border:0; border-radius:8px; background:var(--field); color:var(--accent); font:inherit; font-size:.875rem; font-weight:650; cursor:pointer; }
.password-toggle[hidden] { display:none; }
.auth-forgot a { font-weight:650; }
.summary-missing { display:grid; gap:0; margin-top:4px; }
.summary-missing > p { margin:0 0 2px; }
.summary-exercises .summary-missing .summary-exercise, .summary-exercises .summary-warmup .summary-exercise { margin:0; padding:0; border:0; background:none; }
.summary-exercises .summary-missing .summary-exercise > summary, .summary-exercises .summary-warmup .summary-exercise > summary { min-height:40px; padding:8px 0; font-size:.8125rem; }
.summary-warmup { padding:4px 0; }
section.calendar-day { display:block; margin:4px 0 0; padding:12px 14px; border:1px solid var(--border); border-radius:12px; background:var(--surface); }
section.calendar-day.is-today { background:var(--surface); border-color:var(--accent-fill); }
section.calendar-day .calendar-body { display:grid; gap:8px; }
section.calendar-day .calendar-body h2 { margin:0; font-size:1rem; }
section.calendar-day .calendar-body > p { margin:0; }
.pg-card .pg-weight { grid-template-columns: minmax(0,1fr) auto; }
.choice-chips .chip-radio input[value=""]:checked + span { background:var(--field); border-color:var(--border); color:var(--muted); }
.choice-chips + .small, .choice-chips + p { margin-top:6px; }
.health-stepper .stepper-value input::placeholder { color:var(--muted); opacity:.7; }
@media (min-width: 900px) { .month-nav, .month-grid, .month-legend { max-width:640px; } section.calendar-day { max-width:640px; } }
