/* Gym Tracker – styles (v1.2). Design record: docs/DESIGN.md
   Everything below is built from the tokens in :root; each theme only remaps tokens
   plus a few structural rules at the end of the file. */

/* ---------- Fonts (self-hosted, SIL OFL 1.1, see fonts/OFL-Barlow.txt) ---------- */
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 500 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700 900; font-style: normal; font-display: swap; }
/* metric-adjusted fallbacks to limit layout shift while the woff2 loads */
@font-face { font-family: "Barlow Fallback"; src: local("Arial"), local("Helvetica"), local("Liberation Sans"); size-adjust: 94%; ascent-override: 100%; descent-override: 20%; }
@font-face { font-family: "Barlow Condensed Fallback"; src: local("Arial Narrow"), local("Liberation Sans Narrow"), local("Arial"); size-adjust: 80%; ascent-override: 115%; descent-override: 24%; }

/* ---------- Tokens: theme « Fonte » (default, dark graphite + competition yellow) ---------- */
:root {
  /* colour roles */
  --canvas: #15171c;
  --surface: #1e2128;
  --surface-2: #272b34;
  --sunken: #101216;
  --border: #2f343e;
  --border-strong: #727986;
  --text: #eceae4;
  --text-2: #c9c6be;
  --muted: #a0a3ab;
  --placeholder: #8a8e97;
  --action: #f2c230;
  --action-hover: #f7d055;
  --on-action: #1a1608;
  --action-soft: #3a3320;
  --action-text: #f5cf59;
  --focus: #ffd95a;
  --selection: #5c4c16;
  --success: #4cc38a;
  --on-success: #06180f;
  --success-soft: #1c3429;
  --warning: #f2c230;
  --warning-soft: #3a3320;
  --warning-text: #f5cf59;
  --danger: #c9373c;
  --on-danger: #ffffff;
  --danger-soft: #3a1f22;
  --danger-text: #ff8a80;
  --info-soft: #1f2a3f;
  --header-bg: transparent;
  --header-text: var(--text);
  --header-muted: var(--muted);
  --tab-bg: #191b21;
  --sheet-bg: #1b1e24;
  --backdrop: rgba(5, 6, 8, .66);
  --toast-bg: #eceae4;
  --toast-text: #15171c;
  /* plate colour code (signature) */
  --plate-red: #e5484d;
  --plate-blue: #3e7bfa;
  --plate-yellow: #f2c230;
  --plate-green: #3db373;
  --plate-white: #e8e6e0;
  --plate-steel: #8e939c;
  --plate-orange: #e07b39;
  --week-on: var(--action);
  --on-week: var(--on-action);
  /* type */
  --font-body: "Barlow", "Barlow Fallback", sans-serif;
  --font-num: "Barlow Condensed", "Barlow Condensed Fallback", "Barlow", sans-serif;
  --font-display: var(--font-num);
  --fs-display: 2.25rem;
  --fs-h1: 2rem;
  --fs-h2: 1.25rem;
  --fs-h3: 1.0625rem;
  --fs-body: 1rem;
  --fs-small: .875rem;
  --fs-label: .8125rem;
  --fw-display: 700;
  --fw-strong: 600;
  --lh-tight: 1.1;
  --lh-body: 1.5;
  --track-display: -.01em;
  /* spacing (4 px base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  /* radius (control < card < sheet) */
  --r-control: 8px;
  --r-card: 12px;
  --r-sheet: 20px;
  --r-pill: 999px;
  --r-button: var(--r-control);
  /* elevation */
  --e1: none;
  --e2: 0 12px 32px rgba(0, 0, 0, .45);
  /* motion */
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* layout */
  --content-max: 640px;
  --pad-x: 16px;
  --tab-h: 64px;
  --target: 44px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --badge-h: 0px;
  color-scheme: dark;
  accent-color: var(--action);
  -webkit-text-size-adjust: 100%;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--canvas); scrollbar-color: var(--border-strong) var(--canvas); scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--canvas); color: var(--text);
  font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overscroll-behavior-y: none; min-height: 100vh; min-height: 100dvh;
  caret-color: var(--action);
}
::selection { background: var(--selection); color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
a { color: inherit; text-decoration: none; touch-action: manipulation; }
p a, li a, .link { color: var(--action-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: var(--lh-tight); text-wrap: balance; }
h1 { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: var(--fw-display); letter-spacing: var(--track-display); }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-strong); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-strong); }
p { text-wrap: pretty; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.tiny { font-size: var(--fs-label); line-height: 1.4; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: var(--s3); }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt { margin-top: var(--s4); } .mt-s { margin-top: var(--s2); } .mt-l { margin-top: var(--s5); }
.center { text-align: center; }
.strong { font-weight: var(--fw-strong); }
.accent-text { color: var(--action-text) !important; }
.danger-text { color: var(--danger-text) !important; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: var(--s3); top: calc(var(--safe-t) + var(--s3)); z-index: 300; padding: var(--s3) var(--s4); border-radius: var(--r-control); background: var(--action); color: var(--on-action); font-weight: var(--fw-strong); transform: translateY(-200%); }
.skip:focus-visible { transform: none; }

#view {
  max-width: var(--content-max); margin: 0 auto;
  padding: calc(var(--safe-t) + var(--s4)) var(--pad-x) calc(var(--tab-h) + var(--safe-b) + var(--badge-h) + 132px);
}
#view:focus, h1[tabindex="-1"]:focus { outline: none; } /* programmatic focus target after navigation only; never reached by Tab (tabindex=-1) */

/* ---------- Header ---------- */
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); margin: var(--s2) 0 var(--s5); color: var(--header-text); background: var(--header-bg); }
.top h1 { overflow-wrap: anywhere; }
.top .sub { color: var(--header-muted); font-size: var(--fs-small); margin-top: var(--s1); }
.top-actions { display: flex; gap: var(--s2); flex: none; align-items: center; }
.back { display: inline-flex; align-items: center; gap: var(--s1); color: var(--action-text); font-weight: var(--fw-strong); min-height: var(--target); padding-right: var(--s2); margin-left: -6px; }
.back svg { width: 22px; height: 22px; }
.icon-btn { width: var(--target); height: var(--target); border-radius: var(--r-control); display: inline-grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--text); flex: none; transition: background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:active { transform: scale(.94); }
.goal-line { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s2); color: var(--muted); font-size: var(--fs-small); font-weight: var(--fw-strong); }
.goal-line svg { width: 16px; height: 16px; color: var(--action-text); }

/* sync / network status (discreet) */
.sync-status { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px 0 8px; border-radius: var(--r-pill); font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--muted); background: var(--surface); border: 1px solid var(--border); margin-top: var(--s2); }
.sync-status svg { width: 15px; height: 15px; }
.sync-status.ok svg { color: var(--success); }
.sync-status.err { color: var(--danger-text); border-color: var(--danger-text); }
.sync-status.off svg { color: var(--warning-text); }
.sync-status.busy svg { animation: spin 1s linear infinite; }
button.sync-status { min-height: var(--target); }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--s4); box-shadow: var(--e1); }
.card + .card { margin-top: var(--s3); }
.card.tap { display: block; transition: background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.card.tap:active { transform: scale(.99); background: var(--surface-2); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin: var(--s6) 2px var(--s3); }
.section-title h2 { font-size: var(--fs-h2); }
.section-title a, .section-title button { color: var(--action-text); font-weight: var(--fw-strong); font-size: var(--fs-small); min-height: var(--target); display: inline-flex; align-items: center; padding: 0 var(--s1); }
.group-label { margin: var(--s5) 4px var(--s2); font-size: var(--fs-small); font-weight: var(--fw-strong); color: var(--text-2); }

/* ---------- Buttons ---------- */
.btn {
  min-height: 50px; padding: 0 var(--s4); border-radius: var(--r-button); font-weight: var(--fw-strong); font-size: var(--fs-body);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); text-align: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); user-select: none;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.primary { background: var(--action); border-color: var(--action); color: var(--on-action); }
.btn.ok { background: var(--success); border-color: var(--success); color: var(--on-success); }
.btn.danger { background: var(--danger-soft); border-color: var(--danger-soft); color: var(--danger-text); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
.btn.soft { background: var(--action-soft); border-color: var(--action-soft); color: var(--action-text); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--action-text); }
.btn.sm { min-height: var(--target); padding: 0 var(--s3); font-size: var(--fs-small); }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.busy { pointer-events: none; }
.btn.busy::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn-row { display: flex; gap: var(--s3); }
.btn-row > * { flex: 1; min-width: 0; }
@media (hover: hover) {
  .btn:hover { background: var(--surface); border-color: var(--border-strong); }
  .btn.primary:hover { background: var(--action-hover); border-color: var(--action-hover); }
  .btn.ok:hover { filter: brightness(1.06); }
  .btn.soft:hover, .btn.ghost:hover { background: var(--action-soft); border-color: var(--action-soft); }
  .btn.danger:hover { border-color: var(--danger-text); }
  .icon-btn:hover, .mini-btn:hover, .list-item:hover, .pick-item:hover, .action-list button:hover, .action-list .act-label:hover { background: var(--surface-2); }
  .card.tap:hover { border-color: var(--border-strong); }
  #tabbar a:hover { color: var(--text); }
}

/* ---------- Signature: bumper plates ---------- */
.plate {
  --plate: var(--plate-steel);
  width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); border: 5px solid var(--plate); color: var(--text);
  font-family: var(--font-num); font-weight: 700; font-size: 1rem; line-height: 1;
}
.plate.m-pectoraux { --plate: var(--plate-red); }
.plate.m-dos { --plate: var(--plate-blue); }
.plate.m-jambes { --plate: var(--plate-yellow); }
.plate.m-epaules { --plate: var(--plate-green); }
.plate.m-bras { --plate: var(--plate-white); }
.plate.m-abdos { --plate: var(--plate-steel); }
.plate.m-cardio { --plate: var(--plate-orange); }
.plate.trophy { --plate: var(--warning); color: var(--warning-text); }
.plate.trophy svg { width: 16px; height: 16px; }

/* week tracker */
.week-block { padding: var(--s4); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--s1); margin-top: var(--s3); }
.week .d { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: var(--fs-label); color: var(--muted); font-weight: var(--fw-strong); }
.week .disc { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 4px solid var(--border-strong); background: var(--sunken); }
.week .disc svg { width: 16px; height: 16px; }
.week .on .disc { background: var(--week-on); border-color: var(--week-on); color: var(--on-week); box-shadow: inset 0 0 0 5px var(--week-on), inset 0 0 0 7px var(--on-week); }
.week .today { color: var(--text); }
.week .today .disc { border-color: var(--text); }
.week-sum { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); justify-content: space-between; gap: var(--s1) var(--s3); margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--border); }
.week-sum div { display: flex; flex-direction: column; min-width: 0; }
.week-sum .v { font-family: var(--font-num); font-weight: 700; font-size: 1.5rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.week-sum .l { font-size: var(--fs-label); color: var(--muted); }

/* ---------- Lists ---------- */
.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--e1); }
.list-item { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); min-height: 60px; width: 100%; text-align: left; border-top: 1px solid var(--border); transition: background-color var(--dur-fast) var(--ease); }
.list-item:first-child { border-top: 0; }
.list-item:active { background: var(--surface-2); }
.list-item .t { display: block; font-weight: var(--fw-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .s { display: block; font-size: var(--fs-label); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item > svg { width: 22px; height: 22px; flex: none; color: var(--action-text); }
.list-item.sub-only { min-height: 52px; }
.tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: var(--r-pill); font-size: var(--fs-label); font-weight: var(--fw-strong); background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.tag.accent { background: var(--action-soft); color: var(--action-text); border-color: transparent; }
.tag.ok { background: var(--success-soft); color: var(--success); border-color: transparent; }
.tag.bad { background: var(--danger-soft); color: var(--danger-text); border-color: transparent; }
.tag.gold { background: var(--warning-soft); color: var(--warning-text); border-color: transparent; }
.chev { color: var(--muted); width: 18px; height: 18px; flex: none; }

/* routine rows */
.routine-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s3) var(--s3) var(--s4); border-top: 1px solid var(--border); }
.routine-row:first-child { border-top: 0; }
.routine-row .main { flex: 1; min-width: 0; min-height: var(--target); display: flex; flex-direction: column; justify-content: center; }
.routine-row .t { font-weight: var(--fw-strong); font-size: var(--fs-h3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.routine-row .s { font-size: var(--fs-small); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.routine-row .meta { font-size: var(--fs-label); color: var(--muted); margin-top: 2px; }

/* ---------- Inputs ---------- */
.field { display: block; margin-top: var(--s4); }
.field > span, .field > .lbl { display: block; font-size: var(--fs-small); color: var(--text-2); font-weight: var(--fw-strong); margin: 0 0 6px 2px; }
.field .hint { display: block; font-size: var(--fs-label); color: var(--muted); margin: 6px 2px 0; }
.field .err { display: flex; gap: 6px; align-items: flex-start; font-size: var(--fs-small); color: var(--danger-text); margin: 6px 2px 0; font-weight: var(--fw-strong); }
.field .err svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.input, select.input {
  width: 100%; min-height: 50px; padding: 0 var(--s3); border-radius: var(--r-control); font-size: 1rem;
  background: var(--sunken); border: 1px solid var(--border-strong); color: var(--text);
  transition: border-color var(--dur-fast) var(--ease);
}
.input:focus-visible, .input:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--danger-text); }
.input::placeholder { color: var(--placeholder); opacity: 1; }
.textarea { min-height: 88px; padding: var(--s3); resize: vertical; line-height: 1.45; }
.input.inline { width: 150px; min-height: var(--target); text-align: right; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 56px; }
.pw-wrap .pw-toggle { position: absolute; right: 3px; top: 3px; width: var(--target); height: var(--target); display: grid; place-items: center; color: var(--muted); border-radius: var(--r-control); }
.pw-wrap .pw-toggle svg { width: 22px; height: 22px; }
.pw-rules { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-small); }
.pw-rules li { display: flex; align-items: center; gap: var(--s2); color: var(--text-2); }
.pw-rules li svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.pw-rules li.ok { color: var(--success); }
.pw-rules li.ok svg { color: var(--success); }
.pw-meter { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: var(--s3); }
.pw-meter span { height: 6px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border); transition: background-color var(--dur-base) var(--ease); }
.pw-meter[data-score="1"] span:nth-child(-n+1), .pw-meter[data-score="2"] span:nth-child(-n+2) { background: var(--danger-text); border-color: transparent; }
.pw-meter[data-score="3"] span:nth-child(-n+3), .pw-meter[data-score="4"] span:nth-child(-n+4) { background: var(--warning); border-color: transparent; }
.pw-meter[data-score="5"] span { background: var(--success); border-color: transparent; }
.check { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s2) 0; min-height: var(--target); cursor: pointer; line-height: 1.4; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--action); }
.check .req { color: var(--danger-text); font-weight: var(--fw-strong); }
.check a { position: relative; z-index: 1; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search .input { padding-left: 42px; }
.chips { display: flex; gap: var(--s2); overflow-x: auto; padding: var(--s3) 2px var(--s1); scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: var(--target); padding: 0 var(--s4); border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); font-weight: var(--fw-strong); font-size: var(--fs-small); color: var(--text-2); transition: background-color var(--dur-fast) var(--ease); }
.chip.on { background: var(--action); border-color: var(--action); color: var(--on-action); }
.seg { display: flex; background: var(--sunken); border: 1px solid var(--border); border-radius: var(--r-card); padding: 3px; gap: 3px; }
.seg button { flex: 1; min-height: 40px; border-radius: calc(var(--r-card) - 3px); font-weight: var(--fw-strong); font-size: var(--fs-small); color: var(--muted); }
.seg button.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--action); }
.seg.mini { border-radius: var(--r-control); }
.seg.mini button { min-height: var(--target); padding: 0 var(--s3); flex: none; border-radius: calc(var(--r-control) - 2px); }
.switch { position: relative; width: 52px; height: var(--target); flex: none; } /* 44px hit area, 32px track */
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; z-index: 1; cursor: pointer; }
.switch span { position: absolute; left: 0; right: 0; top: 6px; height: 32px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--border-strong); transition: background-color var(--dur-base) var(--ease); }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--text-2); transition: transform var(--dur-base) var(--ease), background-color var(--dur-base) var(--ease); }
.switch input:checked + span { background: var(--success); border-color: var(--success); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--on-success); }
.switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: var(--target); height: var(--target); border-radius: var(--r-control); background: var(--surface-2); border: 1px solid var(--border); font-size: 1.375rem; font-weight: var(--fw-strong); display: grid; place-items: center; }
.stepper .v { min-width: 56px; text-align: center; font-family: var(--font-num); font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.radio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: var(--s2); }
.radio-grid button { min-height: var(--target); padding: var(--s1) var(--s2); border-radius: var(--r-control); background: var(--surface); border: 1px solid var(--border); font-weight: var(--fw-strong); font-size: var(--fs-small); line-height: 1.2; }
.radio-grid button.on { background: var(--action-soft); border-color: var(--action); color: var(--action-text); box-shadow: inset 0 0 0 1px var(--action); }
.radio-grid.two { grid-template-columns: 1fr 1fr; }

/* ---------- Workout ---------- */
.wk-head {
  position: sticky; top: 0; z-index: 5; margin: calc(-1 * var(--s4) - var(--safe-t)) calc(-1 * var(--pad-x)) var(--s3); padding: calc(var(--safe-t) + var(--s3)) var(--pad-x) var(--s3);
  background: var(--canvas); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: var(--s3);
}
.wk-title { font-family: var(--font-display); font-size: 1.375rem; font-weight: 700; text-align: left; display: block; max-width: 100%; min-height: 32px; }
.wk-timer { color: var(--action-text); font-family: var(--font-num); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 1.0625rem; }
.wk-sum { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); color: var(--muted); font-size: var(--fs-small); margin: var(--s1) 2px var(--s4); }
.wk-sum b { color: var(--text); font-family: var(--font-num); font-weight: 700; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.ex-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--s3) var(--s3) var(--s3); margin-bottom: var(--s4); box-shadow: var(--e1); }
.ex-head { display: flex; align-items: center; gap: var(--s2); padding: 0 0 0 var(--s1); }
.ex-name { font-weight: var(--fw-strong); font-size: var(--fs-h3); color: var(--action-text); text-align: left; flex: 1; min-width: 0; min-height: var(--target); overflow-wrap: anywhere; }
.ex-meta { font-size: var(--fs-label); color: var(--muted); padding: 0 var(--s1) var(--s2); }
.sets-head, .set-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 68px 60px 48px; gap: 6px; align-items: center; }
.sets-head { font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--muted); padding: 0 2px var(--s1); text-align: center; }
.sets-head span:nth-child(2) { text-align: left; padding-left: 4px; }
.sets-head svg { width: 16px; height: 16px; margin: 0 auto; }
.set-row { padding: 3px 2px; border-radius: var(--r-control); transition: background-color var(--dur-base) var(--ease); }
.set-row.done { background: var(--success-soft); }
.set-num { height: var(--target); border-radius: var(--r-control); font-family: var(--font-num); font-weight: 700; font-size: 1.0625rem; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.set-prev { height: var(--target); text-align: left; padding-left: 4px; font-size: var(--fs-small); color: var(--muted); font-family: var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: var(--r-control); }
.set-prev[disabled] { cursor: default; }
.set-in {
  height: var(--target); width: 100%; border-radius: var(--r-control); border: 1px solid var(--border); background: var(--sunken); text-align: center;
  font-family: var(--font-num); font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; padding: 0 4px; color: var(--text);
}
.set-in::placeholder { color: var(--placeholder); opacity: 1; }
.set-in:focus, .set-in:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.set-in.span2, .sets-head .span2 { grid-column: span 2; }
.set-row.done .set-in { background: transparent; border-color: transparent; }
.set-check { height: var(--target); border-radius: var(--r-control); background: var(--surface-2); border: 1px solid var(--border-strong); display: grid; place-items: center; color: var(--muted); }
.set-check svg { width: 22px; height: 22px; }
.set-row.done .set-check { background: var(--success); border-color: var(--success); color: var(--on-success); }
.set-row.pop { animation: lock var(--dur-slow) var(--ease); }
@keyframes lock { 0% { transform: scale(1); } 35% { transform: scale(1.025); } 100% { transform: scale(1); } }
.add-set { width: 100%; margin-top: var(--s2); min-height: var(--target); border-radius: var(--r-control); background: transparent; border: 1px dashed var(--border-strong); font-weight: var(--fw-strong); color: var(--text-2); font-size: var(--fs-small); }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* ---------- Dock: rest timer & active workout pill ---------- */
#dock { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b) + var(--badge-h)); z-index: 30; display: flex; flex-direction: column; gap: var(--s2); padding: 0 var(--s3) var(--s3); pointer-events: none; max-width: var(--content-max); margin: 0 auto; }
#dock > * { pointer-events: auto; }
#active-pill { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s4); min-height: 52px; border-radius: var(--r-card); background: var(--action); color: var(--on-action); font-weight: var(--fw-strong); box-shadow: var(--e2); }
#active-pill .live { width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; animation: live 1.6s ease-in-out infinite; }
#active-pill .num { font-size: 1.125rem; font-weight: 700; }
@keyframes live { 50% { opacity: .35; } }
#restbar { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-card); padding: var(--s3) var(--s3) var(--s3); box-shadow: var(--e2); overflow: hidden; position: relative; }
#restbar .bar { position: absolute; left: 0; top: 0; height: 4px; width: 100%; background: var(--action); transform-origin: left center; transition: transform .3s linear; }
#restbar .rt { display: flex; align-items: center; gap: var(--s2); }
#restbar .time { font-family: var(--font-num); font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; flex: 1; line-height: 1; }
#restbar .time small { display: block; font-family: var(--font-body); font-size: var(--fs-label); color: var(--muted); font-weight: var(--fw-strong); margin-bottom: 2px; }
#restbar button { min-width: 52px; height: var(--target); border-radius: var(--r-control); background: var(--surface-2); border: 1px solid var(--border); font-family: var(--font-num); font-weight: 700; font-size: 1.0625rem; padding: 0 var(--s3); }
#restbar button.skip-rest { background: var(--action); border-color: var(--action); color: var(--on-action); font-family: var(--font-body); font-weight: var(--fw-strong); font-size: var(--fs-small); }

/* ---------- Tab bar ---------- */
#tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tab-h) + var(--safe-b) + var(--badge-h)); padding-bottom: calc(var(--safe-b) + var(--badge-h));
  background: var(--tab-bg); border-top: 1px solid var(--border); display: flex; justify-content: space-around;
}
#tabbar a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: .75rem; font-weight: var(--fw-strong); max-width: 120px; min-height: var(--target); transition: color var(--dur-fast) var(--ease); }
#tabbar a svg { width: 24px; height: 24px; }
#tabbar a.on { color: var(--action-text); }
#tabbar a.on::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--action); }

/* ---------- Sheets / dialogs ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 100; background: transparent; display: flex; align-items: flex-end; justify-content: center; transition: background-color var(--dur-base) var(--ease); overscroll-behavior: contain; }
.sheet-backdrop.open { background: var(--backdrop); }
/* v1.27.1: a sheet being dismissed never swallows taps (tab bar stays live during the close animation) */
.sheet-backdrop.closing, .sheet-backdrop.closing * { pointer-events: none !important; }
.sheet {
  width: 100%; max-width: var(--content-max); max-height: 92vh; max-height: 92dvh; overflow: auto; overscroll-behavior: contain;
  background: var(--sheet-bg); border: 1px solid var(--border); border-bottom: 0; border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding: var(--s3) var(--s4) calc(var(--s4) + var(--safe-b) + var(--badge-h)); transform: translateY(100%); transition: transform var(--dur-slow) var(--ease);
}
.sheet-backdrop.open .sheet { transform: translateY(0); }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--border-strong); margin: 0 auto var(--s3); }
.sheet h2 { margin-bottom: 6px; }
.sheet p { color: var(--text-2); margin: 6px 0 0; }
.sheet .actions { display: flex; gap: var(--s3); margin-top: var(--s5); }
.sheet .actions > * { flex: 1; }
.sheet.tall { height: 92vh; height: 92dvh; display: flex; flex-direction: column; }
.sheet.tall .scroll { flex: 1; overflow: auto; margin: 0 calc(-1 * var(--s4)); padding: 0 var(--s4); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.action-list { margin-top: var(--s3); display: flex; flex-direction: column; gap: var(--s2); }
.action-list button, .action-list .act-label { width: 100%; min-height: 54px; text-align: left; padding: 0 var(--s4); border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border); font-weight: var(--fw-strong); display: flex; align-items: center; gap: var(--s3); }
.action-list .act-label { position: relative; cursor: pointer; }
.action-list .act-label:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.action-list .act-label.disabled { opacity: .5; pointer-events: none; }
.action-list button.danger { color: var(--danger-text); }
.action-list svg { width: 20px; height: 20px; flex: none; }
.pick-item { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 58px; padding: var(--s2) var(--s1); text-align: left; border-bottom: 1px solid var(--border); }
.pick-item .ck { width: 26px; height: 26px; border-radius: 6px; border: 2px solid var(--border-strong); display: grid; place-items: center; flex: none; color: transparent; }
.pick-item .ck svg { width: 16px; height: 16px; }
.pick-item.on .ck { background: var(--action); border-color: var(--action); color: var(--on-action); }
.sheet-hero { text-align: center; padding: var(--s2) 0 var(--s1); }
.sheet-hero .hero-ico { width: 56px; height: 56px; margin: 0 auto var(--s3); border-radius: 50%; display: grid; place-items: center; background: var(--action-soft); color: var(--action-text); }
.sheet-hero .hero-ico svg { width: 28px; height: 28px; }
.sheet-hero .hero-ico.warn { background: var(--warning-soft); color: var(--warning-text); }

/* ---------- Routine editor ---------- */
.r-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--s3); margin-top: var(--s3); box-shadow: var(--e1); }
.r-item .controls { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s3); flex-wrap: wrap; }
.r-item .controls label { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-small); color: var(--text-2); font-weight: var(--fw-strong); }
.r-item .reps { width: 72px; min-height: var(--target); text-align: center; font-family: var(--font-num); font-size: 1.125rem; font-weight: 600; }
.mini-btn { width: var(--target); height: var(--target); border-radius: var(--r-control); background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-2); flex: none; }
.mini-btn svg { width: 18px; height: 18px; }
.mini-btn.danger { color: var(--danger-text); }
.mini-btn[disabled] { opacity: .4; cursor: not-allowed; }
.r-item .stepper .v { min-width: 40px; }

/* ---------- History / sessions ---------- */
.h-card .title { font-weight: var(--fw-strong); font-size: var(--fs-h3); }
.h-card .meta { display: flex; gap: var(--s4); flex-wrap: wrap; color: var(--text-2); font-size: var(--fs-small); margin-top: 6px; }
.h-card .meta span { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.h-card .meta svg { width: 15px; height: 15px; color: var(--muted); }
.h-card .exs { margin: var(--s3) 0 0; padding: 0; list-style: none; font-size: var(--fs-small); color: var(--text-2); }
.h-card .exs li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-line { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) 0; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.set-line:first-of-type { border-top: 0; }
.set-line .n { width: 28px; height: 28px; border-radius: 6px; background: var(--surface-2); display: grid; place-items: center; font-family: var(--font-num); font-size: .9375rem; font-weight: 700; color: var(--text-2); flex: none; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--e1); }
.kpi { padding: var(--s3); border-left: 1px solid var(--border); min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi .label { font-size: var(--fs-label); color: var(--muted); font-weight: var(--fw-strong); }
.kpi .value { font-family: var(--font-num); font-size: 1.5rem; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Charts & records ---------- */
.chart-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--s3) var(--s2) 6px; margin-top: var(--s3); box-shadow: var(--e1); }
.chart-wrap svg { width: 100%; height: auto; }
.chart-sum { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); padding: var(--s1) var(--s2) 6px; font-size: var(--fs-small); color: var(--muted); }
.chart-sum b { color: var(--text); font-family: var(--font-num); font-size: 1.0625rem; }
.up { color: var(--success) !important; } .down { color: var(--danger-text) !important; }
.c-grid { stroke: var(--border); } .c-lbl { fill: var(--muted); font-family: var(--font-body); }
.c-line { stroke: var(--action); } .c-dot { fill: var(--surface); stroke: var(--action); } .c-dot.last { fill: var(--action); } .c-stop { stop-color: var(--action); }
.pr-grid { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--e1); }
.pr { padding: var(--s3); border-top: 1px solid var(--border); border-left: 1px solid var(--border); margin: 0 0 -1px -1px; }
.pr .label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-label); color: var(--warning-text); font-weight: var(--fw-strong); }
.pr .label svg { width: 15px; height: 15px; }
.pr .value { font-family: var(--font-num); font-size: 1.5rem; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.pr .date { font-size: var(--fs-label); color: var(--muted); }
.pr-list { margin: var(--s4) 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.pr-list li { display: flex; align-items: center; gap: var(--s2); padding: var(--s3); border-radius: var(--r-control); background: var(--warning-soft); color: var(--warning-text); font-weight: var(--fw-strong); font-size: var(--fs-small); }
.pr-list svg { width: 18px; height: 18px; flex: none; }

/* ---------- Empty, notices, toast ---------- */
.empty { text-align: center; padding: var(--s6) var(--s5); color: var(--text-2); }
.empty .ico { width: 56px; height: 56px; margin: 0 auto var(--s3); border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.empty .ico svg { width: 26px; height: 26px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.empty p { margin: 0 auto; max-width: 36ch; }
.notice { display: flex; gap: var(--s2); align-items: flex-start; padding: var(--s3); border-radius: var(--r-control); background: var(--warning-soft); color: var(--warning-text); font-weight: var(--fw-strong); font-size: var(--fs-small); }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice.info { background: var(--info-soft); color: var(--text); }
.notice.ok { background: var(--success-soft); color: var(--success); }
.notice.err { background: var(--danger-soft); color: var(--danger-text); }
#toast {
  position: fixed; left: 50%; top: calc(var(--safe-t) + var(--s3)); transform: translate(-50%, -12px); z-index: 200;
  background: var(--toast-bg); color: var(--toast-text); padding: var(--s3) var(--s4); border-radius: var(--r-card); font-weight: var(--fw-strong); font-size: var(--fs-small);
  box-shadow: var(--e2); opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease); max-width: calc(100% - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#update-bar { position: fixed; left: var(--s3); right: var(--s3); top: calc(var(--safe-t) + var(--s3)); z-index: 150; max-width: calc(var(--content-max) - 24px); margin: 0 auto; display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s4); border-radius: var(--r-card); background: var(--toast-bg); color: var(--toast-text); box-shadow: var(--e2); font-weight: var(--fw-strong); font-size: var(--fs-small); }
#update-bar .btn { min-height: var(--target); background: var(--action); border-color: var(--action); color: var(--on-action); }
.sheet-hero .big-ok { color: var(--success); }

/* ---------- Photo ---------- */
.photo-cta { gap: var(--s3); }
.photo-head { display: flex; gap: var(--s3); align-items: center; padding: var(--s3); border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border); margin: 6px 0 var(--s1); }
.photo-head img { width: 64px; height: 64px; border-radius: var(--r-control); object-fit: cover; flex: none; }
.photo-loading { text-align: center; padding: var(--s2) 0 0; }
.photo-loading .frame { position: relative; width: 140px; height: 140px; margin: 0 auto var(--s4); }
.photo-loading img { width: 140px; height: 140px; border-radius: var(--r-card); object-fit: cover; opacity: .8; }
.photo-loading .spinner { position: absolute; inset: 0; margin: auto; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--border-strong); border-top-color: var(--action); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
ul.tips { margin: var(--s3) 0 0; padding-left: 20px; color: var(--text-2); }
ul.tips li { margin-top: var(--s2); line-height: 1.45; }
ul.tips li::marker { color: var(--action-text); }

/* ---------- Settings ---------- */
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.theme-opt { text-align: left; padding: var(--s2); border-radius: var(--r-card); background: var(--surface); border: 2px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.theme-opt.on { border-color: var(--action); }
.theme-opt .t-name { display: flex; align-items: center; gap: 6px; font-weight: var(--fw-strong); font-size: var(--fs-small); margin-top: 6px; }
.theme-opt .t-name svg { width: 16px; height: 16px; color: var(--action-text); }
.theme-opt .t-sub { font-size: var(--fs-label); color: var(--muted); line-height: 1.3; }
.tp { display: block; position: relative; height: 74px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.tp > span { position: absolute; display: block; }
.tp-bar { left: 0; right: 0; top: 0; height: 14px; }
.tp-card { left: 8px; right: 8px; top: 20px; height: 18px; }
.tp-card.s { top: 42px; right: 30px; height: 12px; }
.tp-nav { left: 0; right: 0; bottom: 0; height: 12px; display: flex !important; justify-content: space-around; align-items: center; }
.tp-nav i { width: 5px; height: 5px; border-radius: 50%; display: block; }
.tp-default { background: #15171c; } .tp-default .tp-card { background: #1e2128; border-radius: 4px; border: 1px solid #2f343e; } .tp-default .tp-bar { background: transparent; } .tp-default .tp-nav { background: #191b21; } .tp-default .tp-nav i { background: #f2c230; } .tp-default .tp-card.s { background: #f2c230; }
.tp-hevy { background: #101113; } .tp-hevy .tp-bar { background: #1a1b1e; } .tp-hevy .tp-card { background: #1a1b1e; border-radius: 2px; left: 0; right: 0; } .tp-hevy .tp-card.s { background: #1f6feb; left: 8px; right: 40px; border-radius: 2px; } .tp-hevy .tp-nav { background: #101113; border-top: 1px solid #2b2d31; } .tp-hevy .tp-nav i { background: #1f6feb; }
.tp-yazio { background: #f3f7f5; } .tp-yazio .tp-bar { background: transparent; } .tp-yazio .tp-card { background: #fff; border-radius: 8px; box-shadow: 0 2px 6px rgba(23,38,31,.1); } .tp-yazio .tp-card.s { background: #e0661a; border-radius: 8px; } .tp-yazio .tp-nav { left: 10px; right: 10px; bottom: 3px; background: #fff; border-radius: 8px; box-shadow: 0 2px 6px rgba(23,38,31,.12); } .tp-yazio .tp-nav i { background: #0b7f5e; }
.tp-mfp { background: #eef1f5; } .tp-mfp .tp-bar { background: #0a5fc9; height: 16px; } .tp-mfp .tp-card { background: #fff; border-radius: 2px; border: 1px solid #d8dee6; } .tp-mfp .tp-card.s { background: #0a5fc9; border-radius: 2px; } .tp-mfp .tp-nav { background: #fff; border-top: 1px solid #d8dee6; } .tp-mfp .tp-nav i { background: #0a5fc9; }
.about { font-size: var(--fs-small); color: var(--text-2); }
.about p { margin: 0 0 var(--s2); }
.legal-links { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); justify-content: center; margin-top: var(--s6); font-size: var(--fs-small); }
.legal-links a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; min-height: var(--target); display: inline-flex; align-items: center; }

/* ---------- Account / auth ---------- */
.auth { max-width: 460px; }
.auth h1 { margin-bottom: var(--s2); }
.auth .lead { color: var(--text-2); margin: 0 0 var(--s4); }
.auth form { margin-top: var(--s2); }
.auth .form-err { margin-top: var(--s4); }
.auth .alt { margin-top: var(--s5); text-align: center; color: var(--text-2); }
.auth .alt a, .auth .alt button { color: var(--action-text); font-weight: var(--fw-strong); text-decoration: underline; text-underline-offset: 3px; min-height: var(--target); display: inline-flex; align-items: center; }
.mail-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--action-soft); color: var(--action-text); margin: var(--s5) 0 var(--s4); }
.mail-ico svg { width: 30px; height: 30px; }

.auth .form-err { display: flex; gap: var(--s2); align-items: flex-start; padding: var(--s3); border-radius: var(--r-control); background: var(--danger-soft); color: var(--danger-text); font-weight: var(--fw-strong); font-size: var(--fs-small); }
.auth .form-err[hidden] { display: none; }
.auth .form-err svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.auth .notice { margin: 0 0 var(--s4); }
.auth .btn[type="submit"] { margin-top: var(--s5); }
.auth .mb { margin-bottom: var(--s3); }
.opt { font-weight: var(--fw-body); color: var(--muted); }
fieldset.checks { border: 0; padding: 0; margin: var(--s4) 0 0; min-width: 0; }
.checks .err { display: flex; gap: 6px; align-items: flex-start; font-size: var(--fs-small); color: var(--danger-text); margin: 0 0 var(--s2) 34px; font-weight: var(--fw-strong); }
.checks .err[hidden] { display: none; }
.checks .err svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.check.invalid input { outline: 2px solid var(--danger-text); outline-offset: 2px; }
.check a { color: var(--action-text); text-decoration: underline; text-underline-offset: 3px; }
.right-link { text-align: right; margin: var(--s2) 0 0; }
.right-link a { color: var(--action-text); font-weight: var(--fw-strong); font-size: var(--fs-small); text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: var(--target); }
.stack { display: flex; flex-direction: column; gap: var(--s3); }
.ob-account-card .btn-row .btn { flex: 1; }
.week-empty { margin: var(--s3) 0 0; padding-top: var(--s3); border-top: 1px solid var(--border); }
.active-card { border-color: var(--action); margin-bottom: var(--s4); }
.noscript { padding: var(--s6) var(--s5); color: var(--text); background: var(--canvas); }
/* Static legal pages (served without JS) */
.static-page { padding: 0; }
.static-top { margin: 0; padding: calc(var(--safe-t) + var(--s2)) var(--pad-x) var(--s2); }
.static-main { max-width: var(--content-max); margin: 0 auto; padding: var(--s3) var(--pad-x) calc(var(--safe-b) + var(--s7)); }
.back-link { display: inline-flex; align-items: center; min-height: var(--target); }

/* ---------- Legal pages ---------- */
.legal { max-width: 72ch; line-height: 1.6; }
.legal h1 { margin-bottom: var(--s2); overflow-wrap: anywhere; }
.legal h1 + p { color: var(--muted); margin-top: 0; font-size: var(--fs-small); }
.legal section { margin-top: var(--s6); }
.legal h2 { font-size: var(--fs-h2); margin-bottom: var(--s2); }
.legal h3 { margin: var(--s4) 0 var(--s1); }
.legal p, .legal li { color: var(--text-2); overflow-wrap: anywhere; }
.legal ul { padding-left: 1.25rem; }
.legal li + li { margin-top: 6px; }
.legal strong { color: var(--text); font-weight: var(--fw-strong); }
.legal a { color: var(--action-text); text-decoration: underline; text-underline-offset: 3px; }
.legal-nav { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s5); }
.legal-nav a { min-height: var(--target); display: inline-flex; align-items: center; padding: 0 var(--s3); border-radius: var(--r-pill); border: 1px solid var(--border); color: var(--text-2); font-size: var(--fs-small); font-weight: var(--fw-strong); }
.legal-nav a[aria-current="page"] { background: var(--action); border-color: var(--action); color: var(--on-action); }

/* ---------- Onboarding ---------- */
body.onboarding #view { padding-bottom: calc(var(--safe-b) + var(--badge-h) + var(--s5)); }
.ob { min-height: calc(100dvh - var(--safe-t) - var(--safe-b) - var(--badge-h) - 40px); display: flex; flex-direction: column; }
.ob-top { display: flex; align-items: center; justify-content: space-between; min-height: var(--target); }
.ob-dots { display: flex; gap: 6px; }
.ob-dots span { width: 8px; height: 8px; border-radius: 4px; background: var(--border-strong); transition: background-color var(--dur-base) var(--ease); }
.ob-dots span.on { width: 24px; background: var(--action); }
.ob-dots span.done { background: var(--action-text); }
.ob-hero { padding: var(--s4) 0 var(--s1); }
.ob-hero h1 { margin-top: var(--s4); font-size: var(--fs-display); }
.ob-hero p { margin: var(--s2) 0 0; color: var(--text-2); }
.ob-logo { border-radius: 20px; }
.ob-q { margin: var(--s5) 0 var(--s2); font-size: var(--fs-display); }
.ob-apps { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s4); }
.ob-app { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3) var(--s2) var(--s2); border-radius: var(--r-card); background: var(--surface); border: 2px solid var(--border); text-align: left; min-height: 84px; }
.ob-app .tp { width: 92px; height: 62px; flex: none; }
.ob-app b { display: block; font-size: var(--fs-h3); font-weight: var(--fw-strong); }
.ob-app small { color: var(--muted); font-size: var(--fs-small); }
.ob-app .ck { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; color: transparent; flex: none; }
.ob-app .ck svg { width: 15px; height: 15px; }
.ob-app.on { border-color: var(--action); background: var(--action-soft); }
.ob-app.on .ck { background: var(--action); border-color: var(--action); color: var(--on-action); }
.ob-tips { margin-top: var(--s5); }
.ob-foot { margin-top: auto; padding-top: var(--s5); }
.ob-account { margin-top: var(--s4); text-align: center; color: var(--text-2); font-size: var(--fs-small); }
.ob-account a { color: var(--action-text); font-weight: var(--fw-strong); text-decoration: underline; text-underline-offset: 3px; display: inline-flex; min-height: var(--target); align-items: center; }

/* Netlify Free-plan badge: keep fixed bars and sheet buttons above it */
body.has-nl-badge { --badge-h: 60px; }

@media (min-width: 700px) { :root { --pad-x: 24px; } }

/* ==================================================================
   Theme « Nuit bleue » (Hevy-like): dark neutral, blue action, dense
   ================================================================== */
.theme-hevy {
  --canvas: #101113; --surface: #1a1b1e; --surface-2: #242529; --sunken: #0b0c0d; --border: #2b2d31; --border-strong: #70737b;
  --text: #f2f3f5; --text-2: #c8cad0; --muted: #9a9da5; --placeholder: #8a8d95;
  --action: #1f6feb; --action-hover: #1a5fd0; --on-action: #ffffff; --action-soft: #17263d; --action-text: #6aa8ff; --focus: #6aa8ff; --selection: #1d3a66;
  --success: #3fb950; --on-success: #07190c; --success-soft: #16301d;
  --warning: #d29922; --warning-soft: #33280f; --warning-text: #e3b341;
  --danger: #c9373c; --danger-soft: #361c1e; --danger-text: #ff8a80; --info-soft: #17263d;
  --tab-bg: #101113; --sheet-bg: #18191c; --toast-bg: #f2f3f5; --toast-text: #101113;
  --plate-white: #d9dbe0;
  --week-on: var(--action); --on-week: #ffffff;
  --font-display: var(--font-body); --fs-h1: 1.625rem; --fw-display: 600; --track-display: -.015em;
  --r-control: 6px; --r-card: 8px; --r-sheet: 14px;
  --tab-h: 60px;
}
.theme-hevy .top { margin-bottom: var(--s4); }
.theme-hevy .card { padding: var(--s3); }
.theme-hevy .card + .card { margin-top: var(--s2); }
.theme-hevy .section-title { margin-top: var(--s5); }
.theme-hevy .list-item { min-height: 54px; padding: var(--s2) var(--s3); }
.theme-hevy .plate { width: 38px; height: 38px; border-width: 4px; }
.theme-hevy .ex-card { margin: 0 calc(-1 * var(--pad-x)); border-radius: 0; border-width: 0 0 1px; background: transparent; padding: var(--s3) var(--pad-x) var(--s4); }
.theme-hevy .ex-name { color: var(--action-text); }
.theme-hevy .set-row { padding: 2px; border-radius: 4px; }
.theme-hevy .set-in { border-color: transparent; background: var(--surface); }
.theme-hevy .set-num, .theme-hevy .set-check { border-color: transparent; }
.theme-hevy .wk-head { background: var(--canvas); }
.theme-hevy #active-pill { color: var(--on-action); }
.theme-hevy .week .disc { border-width: 3px; }

/* ==================================================================
   Theme « Clair & doux » (Yazio-like): light mint, rounded, green + orange
   ================================================================== */
.theme-yazio {
  --canvas: #f3f7f5; --surface: #ffffff; --surface-2: #eaf1ee; --sunken: #f4f8f6; --border: #dce6e1; --border-strong: #7f918a;
  --text: #17261f; --text-2: #3a4b44; --muted: #5c6d66; --placeholder: #5b6a63;
  --action: #0b7f5e; --action-hover: #096c50; --on-action: #ffffff; --action-soft: #dff3ea; --action-text: #0a7354; --focus: #0b7f5e; --selection: #c9ecdc;
  --success: #0a7054; --on-success: #ffffff; --success-soft: #dff3ea;
  --warning: #e0661a; --warning-soft: #fff0e4; --warning-text: #ad4a0c;
  --danger: #c42b2b; --on-danger: #ffffff; --danger-soft: #fdeceb; --danger-text: #b42323; --info-soft: #e6f2fb;
  --tab-bg: #ffffff; --sheet-bg: #f7faf9; --backdrop: rgba(23, 38, 31, .42); --toast-bg: #17261f; --toast-text: #ffffff;
  --plate-white: #c9d2ce; --plate-yellow: #e9b10d;
  --week-on: #e0661a; --on-week: #1f1206;
  --font-display: var(--font-body); --fs-h1: 2rem; --fw-display: 600; --track-display: -.02em;
  --r-control: 14px; --r-card: 22px; --r-sheet: 28px; --r-button: var(--r-pill);
  --e1: 0 6px 20px rgba(23, 38, 31, .07);
  --e2: 0 12px 30px rgba(23, 38, 31, .16);
  --pad-x: 20px;
  color-scheme: light;
}
.theme-yazio .card, .theme-yazio .list, .theme-yazio .ex-card, .theme-yazio .kpis, .theme-yazio .r-item, .theme-yazio .chart-wrap, .theme-yazio .pr-grid { border-color: transparent; }
.theme-yazio .card { padding: var(--s5) var(--s4); }
.theme-yazio .icon-btn { border-radius: 50%; border-color: transparent; background: var(--surface); box-shadow: var(--e1); }
.theme-yazio .chip { border-color: transparent; background: var(--surface); box-shadow: var(--e1); }
.theme-yazio .chip.on { background: var(--action); border-color: var(--action); color: var(--on-action); }
.theme-yazio .plate { border-radius: 50%; }
.theme-yazio .week .disc { width: 40px; height: 40px; border-width: 0; background: var(--surface-2); }
.theme-yazio .week .on .disc { background: var(--week-on); color: var(--on-week); box-shadow: none; }
.theme-yazio .week .today .disc { box-shadow: inset 0 0 0 2px var(--text); }
.theme-yazio .week .on.today .disc { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--week-on); }
.theme-yazio .set-row.done { background: var(--success-soft); }
.theme-yazio #tabbar { left: var(--s3); right: var(--s3); bottom: calc(10px + var(--safe-b)); height: calc(var(--tab-h) + var(--badge-h)); padding-bottom: var(--badge-h); border-radius: 26px; border: 0; box-shadow: var(--e2); max-width: calc(var(--content-max) - 24px); margin: 0 auto; }
.theme-yazio #tabbar a.on::before { top: 6px; left: auto; right: auto; width: 32px; height: 32px; border-radius: 50%; background: var(--action-soft); z-index: -1; transform: translateY(-1px); }
.theme-yazio #tabbar a { z-index: 0; }
.theme-yazio #dock { bottom: calc(var(--tab-h) + var(--safe-b) + var(--badge-h) + 18px); }
.theme-yazio .wk-head { border-bottom-color: transparent; }
.theme-yazio .seg { background: var(--surface-2); border-color: transparent; }
.theme-yazio .seg button.on { background: var(--surface); box-shadow: var(--e1); }
.theme-yazio .sync-status { border-color: transparent; box-shadow: var(--e1); }

/* ==================================================================
   Theme « Classique bleu » (MyFitnessPal-like): blue header bar, hairlines
   ================================================================== */
.theme-mfp {
  --canvas: #eef1f5; --surface: #ffffff; --surface-2: #f1f4f8; --sunken: #f7f9fb; --border: #d8dee6; --border-strong: #7b8794;
  --text: #1b1f24; --text-2: #3d444c; --muted: #5d6670; --placeholder: #6b737d;
  --action: #0a5fc9; --action-hover: #0851ad; --on-action: #ffffff; --action-soft: #e3eefc; --action-text: #0a57b8; --focus: #0a5fc9; --selection: #cfe1fa;
  --success: #1c6e33; --on-success: #ffffff; --success-soft: #e3f3e7;
  --warning: #b35c00; --warning-soft: #fff3e0; --warning-text: #9a4f00;
  --danger: #c42b2b; --on-danger: #ffffff; --danger-soft: #fdecec; --danger-text: #b42323; --info-soft: #e3eefc;
  --header-bg: #0a5fc9; --header-text: #ffffff; --header-muted: #d6e6fb;
  --tab-bg: #ffffff; --sheet-bg: #ffffff; --backdrop: rgba(20, 30, 45, .45); --toast-bg: #1b1f24; --toast-text: #ffffff;
  --plate-white: #c3cad3; --plate-yellow: #d9a406;
  --week-on: var(--action); --on-week: #ffffff;
  --font-display: var(--font-body); --fs-h1: 1.375rem; --fw-display: 600; --track-display: 0;
  --r-control: 4px; --r-card: 6px; --r-sheet: 10px;
  color-scheme: light;
}
.theme-mfp .top { margin: calc(-1 * var(--s4) - var(--safe-t)) calc(-1 * var(--pad-x)) var(--s4); padding: calc(var(--safe-t) + var(--s3)) var(--pad-x) var(--s3); align-items: center; min-height: 64px; }
.theme-mfp .top .back { color: #ffffff; }
.theme-mfp .top .icon-btn { background: transparent; border-color: #8db8ef; color: #ffffff; }
.theme-mfp .top .goal-line, .theme-mfp .top .goal-line svg { color: #d6e6fb; }
.theme-mfp .top .sync-status { background: #0951ac; border-color: #8db8ef; color: #ffffff; }
.theme-mfp .top .sync-status svg { color: #ffffff; }
.theme-mfp .top :focus-visible { outline-color: #ffffff; }
.theme-mfp .wk-head { background: var(--header-bg); color: #ffffff; border-bottom: 0; }
.theme-mfp .wk-head .wk-timer { color: #d6e6fb; }
.theme-mfp .wk-head .icon-btn { background: transparent; border-color: #8db8ef; color: #ffffff; }
.theme-mfp .wk-head .btn.ok { background: #ffffff; border-color: #ffffff; color: var(--action); }
.theme-mfp .wk-head :focus-visible { outline-color: #ffffff; }
.theme-mfp .section-title h2 { font-size: var(--fs-h3); }
.theme-mfp .card { box-shadow: none; }
.theme-mfp .ex-name { color: var(--text); }
.theme-mfp .plate { width: 36px; height: 36px; border-width: 4px; }
.theme-mfp .chip { border-radius: var(--r-control); }
.theme-mfp #tabbar a.on::before { left: 18%; right: 18%; }
.theme-mfp .week .disc { border-radius: 50%; }

/* light themes: shared */
.theme-light .switch span::after { box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }

/* ---------- Reduced motion: keep colour/opacity feedback, drop movement ---------- */
@media (prefers-reduced-motion: reduce) {
  .sheet { transition: none; }
  .sheet-backdrop { transition: background-color var(--dur-fast) linear; }
  #toast { transform: translate(-50%, 0); transition: opacity var(--dur-fast) linear; }
  .set-row.pop, .shake { animation: none; }
  .btn:active, .icon-btn:active, .card.tap:active { transform: none; }
  #active-pill .live { animation: none; }
  .spinner, .btn.busy::before, .sync-status.busy svg { animation-duration: 2.4s; }
  #restbar .bar { transition: none; }
  html { scroll-behavior: auto; }
}
@media (forced-colors: active) {
  .set-row.done { outline: 2px solid CanvasText; }
  .chip.on, .seg button.on, .radio-grid button.on, #tabbar a.on { outline: 2px solid Highlight; }
}
.install-hint svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 2px; }

/* ---------- Exercise media (v1.3) ---------- */
/* Thumbnail: the illustration on a tile ringed with the muscle-group plate colour (the app's signature). */
.ex-thumb {
  --plate: var(--plate-steel);
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; overflow: hidden;
  border-radius: var(--r-control); background: var(--surface-2); border: 2px solid var(--plate);
}
.ex-thumb.m-pectoraux { --plate: var(--plate-red); } .ex-thumb.m-dos { --plate: var(--plate-blue); }
.ex-thumb.m-jambes { --plate: var(--plate-yellow); } .ex-thumb.m-epaules { --plate: var(--plate-green); }
.ex-thumb.m-bras { --plate: var(--plate-white); } .ex-thumb.m-abdos { --plate: var(--plate-steel); }
.ex-thumb.m-cardio { --plate: var(--plate-orange); }
.ex-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.ex-thumb.photo img { object-fit: cover; padding: 0; }
.ex-thumb.missing img, .ex-preview.missing img { visibility: hidden; }
.theme-yazio .ex-thumb { border-radius: 50%; }
/* line art is black on transparent: light lines on dark themes */
html:not(.theme-light) .ex-thumb.lib img, html:not(.theme-light) .ex-preview.lib img { filter: invert(1) brightness(.92); }

.ex-preview { margin: 0 0 var(--s4); }
.ex-preview .frames {
  position: relative; display: block; width: 100%; max-width: 360px; max-height: 240px; margin: 0 auto; padding: 0;
  border: 0; background: none; cursor: pointer; border-radius: var(--r-card); min-height: var(--target);
}
.ex-preview .frames img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ex-preview .f.a { animation: ex-a 1.8s steps(1, end) infinite; }
.ex-preview .f.b { animation: ex-b 1.8s steps(1, end) infinite; }
@keyframes ex-a { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes ex-b { 0% { opacity: 0; } 50% { opacity: 1; } }
.ex-preview.paused .f { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .ex-preview .f { animation: none; }
  .ex-preview .f.b { opacity: 0; }
  .ex-preview.show-b .f.a { opacity: 0; } .ex-preview.show-b .f.b { opacity: 1; }
}
.ex-preview figcaption { text-align: center; margin-top: var(--s2); }
.ex-preview.photo img { display: block; width: 100%; max-height: 260px; object-fit: contain; border-radius: var(--r-card); background: var(--surface-2); }
.ex-thumb-btn { padding: 0; border: 0; background: none; border-radius: var(--r-control); flex: none; min-width: var(--target); min-height: var(--target); display: grid; place-items: center; cursor: pointer; }
.ex-head { align-items: center; gap: var(--s3); }
.pic-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s2) 0 var(--s1); }
.pic-actions .btn { min-height: var(--target); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.check-row { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3); margin: var(--s3) 0; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface-2); cursor: pointer; }
.check-row input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; }
.hidden-ex summary { cursor: pointer; min-height: var(--target); display: flex; align-items: center; color: var(--text-2, var(--muted)); font-weight: 600; }
.preview-sheet .ex-preview .frames { max-height: 300px; }
.about-h { font-size: var(--fs-small); margin: var(--s4) 0 var(--s1); }
.policy-notice { border-left: 4px solid var(--action); }
.policy-notice .row { gap: var(--s2); align-items: center; }
.policy-notice .row svg { width: 20px; height: 20px; color: var(--action-text, var(--action)); flex: none; }
.policy-notice h2 { font-size: var(--fs-body); margin: 0; }
.policy-notice .btn-row { margin-top: var(--s3); }

/* ==================================================================
   v1.4 – progression coach: suggestions, RIR, next session, volume
   ================================================================== */
.rx-strip { margin: 0 0 var(--s2); padding: var(--s2) var(--s3); border-radius: var(--r-control); background: var(--surface-2); border-left: 3px solid var(--action); display: grid; gap: 2px; }
.rx-line { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.rx-label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--action-text); text-transform: uppercase; letter-spacing: .04em; }
.rx-label svg { width: 15px; height: 15px; }
.rx-sum { font-size: 1.125rem; font-weight: var(--fw-strong); color: var(--text); }
.rx-rir { color: var(--text-2); font-weight: 600; font-size: var(--fs-small); }
.rx-actions { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: 2px; }
.rx-actions .btn svg { width: 16px; height: 16px; }
.rx-tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: var(--r-pill); font-size: var(--fs-label); font-weight: var(--fw-strong); white-space: nowrap; background: var(--action-soft); color: var(--action-text); }
.rx-tag.m-load, .rx-tag.m-bw-load { background: var(--success-soft); color: var(--success); }
.rx-tag.m-deload, .rx-tag.m-reduce, .rx-tag.m-restart, .rx-tag.m-hold, .rx-tag.m-variation, .rx-tag.m-resume { background: var(--warning-soft); color: var(--warning-text); }
.rx-tag.m-calibrate, .rx-tag.m-none { background: var(--surface); color: var(--text-2); border: 1px solid var(--border); }
.set-in.sugg::placeholder { color: var(--action-text); font-weight: var(--fw-strong); }
.rir-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); padding: var(--s1) var(--s1) var(--s2) 46px; }
.rir-l { font-size: var(--fs-label); color: var(--text-2); font-weight: var(--fw-strong); width: 100%; }
.rir-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rir-chip { min-width: var(--target); min-height: var(--target); border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-family: var(--font-num); font-weight: 700; font-size: 1.0625rem; }
.rir-chip.on { background: var(--action); border-color: var(--action); color: var(--on-action); }
.rir-skip { min-height: var(--target); padding: 0 var(--s2); color: var(--action-text); font-weight: var(--fw-strong); font-size: var(--fs-small); }
.rir-done { padding: 0 0 2px 46px; }
.rir-done button { min-height: 32px; padding: 0 var(--s2); font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--text-2); border-radius: var(--r-pill); border: 1px dashed var(--border-strong); }
@media (pointer: coarse) { .rir-done button { min-height: var(--target); }
body.focus .rc-open { min-height: var(--target); } }
.next-card .next-ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--action-soft); color: var(--action-text); }
.next-card .next-ico svg { width: 22px; height: 22px; }
.next-lines { display: grid; margin-top: 2px; }
.next-list { padding: 0; overflow: hidden; }
.next-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-top: 1px solid var(--border); }
.next-row:first-child { border-top: 0; }
.next-name { line-height: 1.25; overflow-wrap: anywhere; }
.next-rx { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-top: 4px; }
.next-rx .num { font-weight: var(--fw-strong); font-size: 1.0625rem; }
.why-btn { flex: none; }
.rx-box { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s3); border-radius: var(--r-control); background: var(--surface-2); margin: var(--s3) 0; }
.rx-box b { font-size: 1.125rem; }
.rx-box .tiny { width: 100%; }
.disclaimer { display: flex; gap: var(--s2); align-items: flex-start; color: var(--text-2); }
.disclaimer svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--muted); }
.rx-card h2 { font-size: var(--fs-h2); }
.rx-big { font-size: 1.5rem; font-weight: 700; margin-top: var(--s2); color: var(--text); }
.prog-chart { margin: var(--s4) 0 0; }
.prog-chart svg { width: 100%; height: auto; }
.c-est { stroke: var(--muted); }
.c-fore { stroke: var(--action); }
.c-fore-dot { fill: var(--surface); stroke: var(--action); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); color: var(--text-2); margin-top: var(--s1); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 18px; height: 0; border-top: 3px solid var(--action); }
.legend i.lg-est { border-top: 2px dashed var(--muted); }
.legend i.lg-fore { width: 10px; height: 10px; border: 2.5px solid var(--action); border-radius: 50%; }
.sub-h { font-size: var(--fs-small); font-weight: var(--fw-strong); color: var(--text-2); margin: var(--s4) 2px var(--s2); }
.best-sets { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); counter-reset: b; }
.best-sets li { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; counter-increment: b; }
.best-sets li::before { content: counter(b); font-family: var(--font-num); font-weight: 700; color: var(--action-text); min-width: 14px; }
.rx-settings { margin-top: var(--s4); border-top: 1px solid var(--border); padding-top: var(--s2); }
.rx-settings summary { min-height: var(--target); display: flex; align-items: center; font-weight: var(--fw-strong); color: var(--action-text); cursor: pointer; }
.rx-settings .field { margin-top: var(--s2); }
.vol-list { list-style: none; padding: 0; margin: var(--s3) 0; overflow: hidden; }
.vol-row { padding: var(--s3) var(--s4); border-top: 1px solid var(--border); display: grid; gap: 6px; }
.vol-row:first-child { border-top: 0; }
.vol-v { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); color: var(--text-2); }
.vol-v b { font-size: 1.125rem; color: var(--text); }
.vol-pill { display: inline-flex; min-height: 22px; align-items: center; padding: 0 8px; border-radius: var(--r-pill); font-size: var(--fs-label); font-weight: var(--fw-strong); background: var(--surface-2); color: var(--text-2); }
.vol-pill.ok { background: var(--success-soft); color: var(--success); }
.vol-pill.warn { background: var(--warning-soft); color: var(--warning-text); }
.vol-pill.high { background: var(--danger-soft); color: var(--danger-text); }
.vol-track { position: relative; height: 10px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.vol-band { position: absolute; top: 0; bottom: 0; background: var(--success-soft); border-left: 2px solid var(--success); border-right: 2px solid var(--success); }
.vol-fill { position: absolute; left: 0; top: 3px; bottom: 3px; border-radius: var(--r-pill); background: var(--text-2); }
.vol-fill.ok { background: var(--success); } .vol-fill.warn { background: var(--warning-text); } .vol-fill.high { background: var(--danger-text); }
.prose h2 { font-size: var(--fs-h3); margin: var(--s5) 0 var(--s2); }
.prose p { margin: 0 0 var(--s3); }
.refs { padding-left: 1.2em; font-size: var(--fs-small); color: var(--text-2); display: grid; gap: var(--s2); }
.refs a { overflow-wrap: anywhere; }
.match-sheet .photo-head { margin-bottom: var(--s3); }
.match-sheet details summary { min-height: var(--target); display: flex; align-items: center; color: var(--action-text); font-weight: var(--fw-strong); cursor: pointer; }
.theme-hevy .rx-strip { background: var(--surface); }
.theme-yazio .rx-strip { border-left-width: 0; background: var(--action-soft); }
.theme-yazio .rx-strip .rx-sum { color: var(--text); }

/* ==================================================================
   v1.5 – rest alert, push, supersets / warm-ups / drop sets, plates,
   records, muscle map, programs, calendar, body tracking
   ================================================================== */
/* ---- Rest-end alert: edge flash + big end state ---- */
body.rest-flash::after { content: ""; position: fixed; inset: 0; z-index: 260; pointer-events: none; box-shadow: inset 0 0 0 10px var(--action), inset 0 0 48px 10px var(--action); animation: edge-flash .5s steps(2, jump-none) 12; }
@keyframes edge-flash { 0% { opacity: 1; } 100% { opacity: .15; } }
#rest-alert { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; padding: calc(var(--safe-t) + var(--s5)) var(--s5) calc(var(--safe-b) + var(--s5)); background: var(--action); color: var(--on-action); text-align: center; animation: ra-in var(--dur-slow) var(--ease); cursor: pointer; }
@keyframes ra-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
#rest-alert .ra-inner { width: 100%; max-width: 420px; display: grid; justify-items: center; gap: var(--s3); }
#rest-alert .ra-ico { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; border: 4px solid currentColor; animation: ra-ring 1s var(--ease) 3; }
#rest-alert .ra-ico svg { width: 44px; height: 44px; }
@keyframes ra-ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(4deg); } }
#rest-alert h2 { font-family: var(--font-num); font-size: 3rem; font-weight: 700; line-height: 1; letter-spacing: -.01em; text-transform: uppercase; }
#rest-alert .ra-next { margin: 0; font-size: 1.125rem; font-weight: var(--fw-strong); overflow-wrap: anywhere; }
#rest-alert .ra-k { display: block; font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .06em; opacity: .85; margin-bottom: 2px; }
#rest-alert .ra-since { margin: 0; font-size: var(--fs-small); font-weight: var(--fw-strong); }
#rest-alert .ra-since .num { font-size: 1.25rem; }
#rest-alert .ra-btns { display: flex; gap: var(--s3); width: 100%; margin-top: var(--s3); }
#rest-alert .ra-btns .btn { flex: 1; min-height: 56px; font-size: 1.125rem; }
#rest-alert .ra-go { background: var(--on-action); border-color: var(--on-action); color: var(--action); }
#rest-alert .ra-plus { background: transparent; border: 2px solid currentColor; color: var(--on-action); }
#rest-alert .btn:focus-visible { outline: 3px solid var(--on-action); outline-offset: 3px; }
#rest-alert .ra-hint { margin: 0; font-size: var(--fs-label); opacity: .85; }
.push-prompt { border-left: 4px solid var(--action); }
.push-prompt .row svg { width: 22px; height: 22px; color: var(--action-text); flex: none; }
.push-prompt h2 { font-size: var(--fs-body); }
.push-prompt p { margin: var(--s2) 0 var(--s3); color: var(--text-2); }
.push-status.on #sw-push-s { color: var(--success); font-weight: var(--fw-strong); }
.push-status.denied #sw-push-s, .push-status.ios-browser #sw-push-s { color: var(--warning-text); font-weight: var(--fw-strong); }
.wake-note { display: flex; gap: 6px; align-items: flex-start; margin: 0 2px var(--s3); }
.wake-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }

/* ---- PR celebration ---- */
#pr-banner:empty { display: none; }
.pr-banner { position: fixed; left: var(--s3); right: var(--s3); top: calc(var(--safe-t) + 76px); z-index: 45; max-width: calc(var(--content-max) - 2 * var(--s3)); margin: 0 auto; display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-card); background: var(--surface); border: 2px solid var(--warning); box-shadow: var(--e2); animation: pr-in var(--dur-slow) var(--ease); }
.pr-banner .small { color: var(--text-2); overflow-wrap: anywhere; }
.pr-burst { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--warning-soft); color: var(--warning-text); box-shadow: 0 0 0 0 var(--warning); animation: pr-burst 1.1s var(--ease) 2; }
.pr-burst svg { width: 22px; height: 22px; }
@keyframes pr-in { from { opacity: 0; transform: translateY(-12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pr-burst { 0% { box-shadow: 0 0 0 0 var(--warning); transform: scale(.9) rotate(-8deg); } 50% { transform: scale(1.12) rotate(6deg); } 100% { box-shadow: 0 0 0 16px transparent; transform: none; } }
.pr-row { display: flex; align-items: center; gap: 6px; padding: 2px 0 4px 46px; color: var(--warning-text); font-size: var(--fs-label); font-weight: var(--fw-strong); }
.pr-row svg { width: 15px; height: 15px; flex: none; }

/* ---- Warm-up / drop sets ---- */
.set-num.k-w { background: var(--info-soft); color: var(--text); border: 1px dashed var(--border-strong); font-size: 1rem; }
.set-num.k-d { background: var(--warning-soft); color: var(--warning-text); }
.set-row.warm .set-in { font-weight: 500; }
.set-row.warm:not(.done) .set-in { border-style: dashed; }
.set-row.drop { box-shadow: inset 3px 0 0 var(--warning-text); }
.set-line .n.k-w, .set-line .n.k-d { font-weight: 700; }
.set-line .n.k-w { color: var(--muted); } .set-line .n.k-d { color: var(--warning-text); }
.set-line.warm { color: var(--muted); }

/* ---- Supersets / circuits ---- */
.group-tag { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 10px; margin-bottom: var(--s2); border-radius: var(--r-pill); background: var(--action-soft); color: var(--action-text); font-size: var(--fs-label); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.group-tag svg { width: 14px; height: 14px; }
.ex-card.in-group, .r-item.in-group { position: relative; border-left: 4px solid var(--action); }
.ex-card.in-group:not(.g-last) { margin-bottom: var(--s2); }
.ex-card.in-group:not(.g-last)::after, .r-item.in-group:not(.g-last)::after { content: ""; position: absolute; left: -4px; bottom: calc(-1 * var(--s2) - 2px); height: calc(var(--s2) + 4px); width: 4px; background: var(--action); }
.r-item.in-group:not(.g-first) { margin-top: var(--s2); }
.theme-hevy .ex-card.in-group { border-left: 4px solid var(--action); padding-left: calc(var(--pad-x) - 4px); }
.r-link { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: var(--target); margin-top: var(--s2); border-radius: var(--r-control); border: 1px dashed var(--border-strong); color: var(--text-2); font-size: var(--fs-small); font-weight: var(--fw-strong); }
.r-link svg { width: 16px; height: 16px; }
.r-link.on { border-style: solid; border-color: var(--action); background: var(--action-soft); color: var(--action-text); }

/* ---- Plate calculator ---- */
.plate-calc .plate-input { display: flex; gap: var(--s2); align-items: center; }
.plate-calc .plate-input .input { flex: 1; text-align: center; font-size: 1.375rem; font-weight: 700; }
.plate-calc .plate-input .mini-btn { font-size: 1.375rem; font-weight: 700; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.barbell { width: 100%; height: auto; margin: var(--s3) 0 0; }
.bb-bar { fill: var(--plate-steel); }
.bb-grip { fill: var(--border-strong); }
.bb-collar { fill: var(--text-2); }
.pl { stroke: rgba(0, 0, 0, .35); stroke-width: 1; }
.pl-red { fill: var(--plate-red); } .pl-blue { fill: var(--plate-blue); } .pl-yellow { fill: var(--plate-yellow); } .pl-green { fill: var(--plate-green); } .pl-white { fill: var(--plate-white); } .pl-steel { fill: var(--plate-steel); }
.plate-out { margin-top: var(--s2); }
.plate-out p { margin: var(--s2) 0 0; }
.plate-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; }
.pc { min-width: 46px; min-height: 34px; padding: 0 10px; border-radius: var(--r-pill); display: inline-grid; place-items: center; font-family: var(--font-num); font-weight: 700; font-size: 1.0625rem; color: #111214; border: 1px solid rgba(0, 0, 0, .25); }
.pc-red { background: var(--plate-red); } .pc-blue { background: var(--plate-blue); } .pc-yellow { background: var(--plate-yellow); } .pc-green { background: var(--plate-green); } .pc-white { background: var(--plate-white); } .pc-steel { background: var(--plate-steel); }
.chip.plate-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); color: var(--text); border-color: var(--border); }
.chip.plate-chip::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .3); background: var(--plate-steel); }
.chip.plate-chip.pc-red::before { background: var(--plate-red); } .chip.plate-chip.pc-blue::before { background: var(--plate-blue); } .chip.plate-chip.pc-yellow::before { background: var(--plate-yellow); } .chip.plate-chip.pc-green::before { background: var(--plate-green); } .chip.plate-chip.pc-white::before { background: var(--plate-white); }
.chip.plate-chip:not(.on) { text-decoration: line-through; color: var(--muted); }
.chip.plate-chip.on { background: var(--action-soft); border-color: var(--action); color: var(--text); }
.warn-text { color: var(--warning-text); font-weight: var(--fw-strong); }

/* ---- Records ---- */
.pr-events { list-style: none; padding: 0; overflow: hidden; }
.pr-events li + li { border-top: 1px solid var(--border); }
.pr-events a { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); min-height: 56px; }
.pr-ev-d { flex: none; min-width: 52px; font-family: var(--font-num); font-weight: 700; color: var(--warning-text); font-variant-numeric: tabular-nums; }
.reps-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; font-size: var(--fs-small); }
.reps-table th { text-align: left; padding: var(--s2) var(--s3); color: var(--text-2); font-weight: var(--fw-strong); background: var(--surface-2); font-size: var(--fs-label); }
.reps-table td { padding: var(--s2) var(--s3); border-top: 1px solid var(--border); }
.pr-timeline { list-style: none; margin: 0; padding: 0 0 0 var(--s4); border-left: 2px solid var(--border-strong); display: grid; gap: var(--s2); font-size: var(--fs-small); }
.pr-timeline li { position: relative; display: flex; gap: var(--s3); color: var(--text-2); }
.pr-timeline li::before { content: ""; position: absolute; left: calc(-1 * var(--s4) - 6px); top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--warning); }
.quick-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin-top: var(--s3); }
.quick-links a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-small); font-weight: var(--fw-strong); box-shadow: var(--e1); }
.quick-links svg { width: 22px; height: 22px; color: var(--action-text); }
.theme-yazio .quick-links a { border-color: transparent; }

/* ---- Muscle map ---- */
.mm { width: 100%; max-width: 420px; height: auto; margin: var(--s2) auto 0; }
.mm-base { fill: var(--surface-2); stroke: var(--border-strong); stroke-width: .8; }
.mm-r { cursor: pointer; stroke: var(--canvas); stroke-width: 1; }
.mm-r.mm-none { fill: var(--sunken); stroke: var(--border-strong); stroke-dasharray: 2 2; }
.mm-r.mm-ok { fill: var(--success); }
.mm-r.mm-warn { fill: url(#mm-hatch); stroke: var(--warning-text); }
.mm-r.mm-high { fill: url(#mm-dots); stroke: var(--danger-text); }
.mm-r.mm-info { fill: var(--plate-blue); }
.mm-hatch-bg { fill: var(--warning-soft); } .mm-hatch-ln { stroke: var(--warning-text); }
.mm-dots-bg { fill: var(--danger-soft); } .mm-dots-dt { fill: var(--danger-text); }
.mm-cap { fill: var(--text-2); font-size: 11px; font-weight: 600; font-family: var(--font-body); }
.mm-legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); padding: 0; margin: var(--s2) 0 0; font-size: var(--fs-label); color: var(--text-2); }
.mm-legend li { display: inline-flex; align-items: center; gap: 6px; }
.mm-legend .sw { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }
.sw.mm-ok { background: var(--success); }
.sw.mm-warn { background: repeating-linear-gradient(45deg, var(--warning-text) 0 2px, var(--warning-soft) 2px 5px); border: 1px solid var(--warning-text); }
.sw.mm-high { background: radial-gradient(circle, var(--danger-text) 1.4px, var(--danger-soft) 1.6px) 0 0 / 5px 5px; border: 1px solid var(--danger-text); }
.sw.mm-none { background: var(--sunken); border: 1px dashed var(--border-strong); }
.mm-detail { list-style: none; padding: 0; margin: var(--s3) 0; }
.mm-detail li { display: flex; gap: var(--s3); align-items: baseline; padding: var(--s2) 0; border-top: 1px solid var(--border); }
.vol-name { display: inline-flex; align-items: center; gap: 2px; min-height: var(--target); margin: calc(-1 * var(--s2)) 0; text-align: left; }
.vol-name svg { width: 16px; height: 16px; color: var(--muted); }

/* ---- Programs ---- */
.prog-days { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 4px solid var(--plate-blue); background: var(--surface-2); font-family: var(--font-num); font-size: var(--fs-label); color: var(--text-2); line-height: 1; grid-auto-flow: column; }
.prog-days b { font-size: 1.25rem; color: var(--text); }
.prog-session h2 { font-size: var(--fs-h3); }
.prog-ex { list-style: none; padding: 0; margin: var(--s2) 0 0; }
.prog-ex li { display: flex; gap: var(--s3); align-items: baseline; padding: var(--s2) 0; border-top: 1px solid var(--border); font-size: var(--fs-small); }
.prog-ex li:first-child { border-top: 0; }
.link-plain { display: inline-flex; align-items: center; gap: 6px; min-height: var(--target); color: var(--action-text); font-weight: var(--fw-strong); }
.link-plain svg { width: 16px; height: 16px; }

/* ---- Calendar & consistency ---- */
.cal-nav h2 { font-size: var(--fs-h3); }
.cal { width: 100%; border-collapse: separate; border-spacing: 0 4px; table-layout: fixed; margin-top: var(--s2); }
.cal th { font-size: var(--fs-label); color: var(--muted); font-weight: var(--fw-strong); padding-bottom: 4px; }
.cal abbr { text-decoration: none; }
.cal td { text-align: center; padding: 0; }
.cal-d { position: relative; width: 40px; height: 40px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-num); font-weight: 600; font-size: 1rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cal-d.on { background: var(--week-on); color: var(--on-week); font-weight: 700; }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--text); }
.cal-d.on.today { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--week-on); }
.cal-d.future { color: var(--muted); }
.cal-d i { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 4px; background: var(--text); color: var(--surface); font-style: normal; font-size: 11px; line-height: 18px; font-weight: 700; }
.cons-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.cons-kpis > div { display: grid; gap: 2px; }
.cons-kpis .v { font-size: 2rem; font-weight: 700; line-height: 1; }
.cons-kpis .l { font-size: var(--fs-label); color: var(--text-2); }
.cons-bars { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 96px; margin-top: var(--s4); padding-bottom: 1px; border-bottom: 1px solid var(--border-strong); }
.cons-bars .cb { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.cons-bars .cb i { display: block; width: 100%; height: var(--h); min-height: 2px; border-radius: 4px 4px 0 0; background: var(--border-strong); }
.cons-bars .cb.some i { background: var(--text-2); }
.cons-bars .cb.hit i { background: var(--success); }
.cons-bars .cb.cur i { outline: 2px solid var(--action); outline-offset: 1px; }
.cons-target { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--warning-text); pointer-events: none; }
.cons-axis { display: flex; justify-content: space-between; margin-top: 4px; }

/* ---- Body tracking & progress photos ---- */
.body-gate .sheet-hero h2 { font-size: var(--fs-h3); }
.body-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s3); }
.pp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin-top: var(--s3); }
.pp { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-control); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.pp img { width: 100%; height: 100%; object-fit: cover; }
.pp span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); color: #ffffff; font-size: var(--fs-label); font-weight: var(--fw-strong); text-align: left; }
.pp-big { margin: var(--s3) 0 0; }
.pp-big img { width: 100%; max-height: 62vh; object-fit: contain; border-radius: var(--r-card); background: var(--surface-2); }
.program-card .next-ico, .program-entry .next-ico { background: var(--info-soft); color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  /* static alternative: a solid thick frame, no blinking, no movement */
  body.rest-flash::after { animation: none; box-shadow: inset 0 0 0 12px var(--action); }
  #rest-alert, #rest-alert .ra-ico, .pr-banner, .pr-burst { animation: none; }
}
@media (forced-colors: active) {
  body.rest-flash::after { box-shadow: inset 0 0 0 12px Highlight; }
  #rest-alert { border: 4px solid CanvasText; }
  .mm-r.mm-ok { fill: Highlight; } .mm-r.mm-none { fill: Canvas; }
  .cal-d.on { outline: 2px solid Highlight; }
}

/* ---------- v1.6 ---------- */
.rdy-q { margin-top: var(--s3); }
.rdy-l { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.rdy-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.rdy-b { font-size: 1.55rem; min-height: 52px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface-2); transition: transform .12s, border-color .12s, background .12s; }
.rdy-b.on { border-color: var(--action); background: var(--action-soft); transform: scale(1.06); }
.rdy-b:active { transform: scale(.94); }
.rdy-strip { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin: var(--s3) 0 0; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.rdy-strip .tiny { display: block; color: var(--text-2); line-height: 1.3; }
.rdy-strip.off { color: var(--action-text); font-weight: 600; justify-content: center; border-style: dashed; }
.rdy-strip svg { width: 18px; height: 18px; }
.rdy-score { font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 1.9rem; line-height: 1; min-width: 2.2ch; text-align: center; font-variant-numeric: tabular-nums; }
.rdy-strip.t-light .rdy-score { color: var(--warning-text); } .rdy-strip.t-pr .rdy-score { color: var(--success); }
.rdy-strip.t-light { border-color: var(--warning); background: var(--warning-soft); } .rdy-strip.t-pr { border-color: var(--success); background: var(--success-soft); }
.rdy-trend { display: flex; align-items: flex-end; gap: 2px; height: 30px; width: 56px; flex: none; }
.rdy-trend i { flex: 1; background: var(--border-strong); border-radius: 2px 2px 0 0; min-height: 3px; }
.rdy-trend i.lo { background: var(--warning); } .rdy-trend i.hi { background: var(--success); }
.rdy-trend i:last-child { background: var(--action); }
.rx-tag.m-light, .rx-tag.m-swap { background: var(--warning-soft); color: var(--warning-text); }
.swap-btn { color: var(--action-text); }
.swap-list { display: grid; gap: 6px; margin-top: var(--s2); }
.swap-row { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); width: 100%; }
.swap-row .strong, .swap-row .tiny { display: block; }
.swap-load { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; font-size: .9rem; white-space: nowrap; }
.swap-load em { display: block; font-style: normal; font-weight: 400; font-size: .72rem; color: var(--muted); }
.rt-list { display: grid; gap: 8px; }
.rt-row { display: flex; align-items: center; gap: 4px; padding: 10px 8px 10px 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--e1); touch-action: pan-y; }
.rt-row.dragging, .r-item.dragging { position: relative; z-index: 5; box-shadow: 0 12px 30px rgb(0 0 0 / .25); opacity: .96; transition: none; }
.rt-grip { touch-action: none; width: 32px; min-height: 44px; display: grid; place-items: center; color: var(--muted); background: none; border: 0; cursor: grab; flex: none; }
.rt-grip svg { width: 18px; height: 18px; }
.rt-main { flex: 1; min-width: 0; color: inherit; text-decoration: none; display: grid; gap: 2px; }
.rt-main .t { font-weight: 700; font-size: 1.05rem; }
.rt-main .s { font-size: .82rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-main .meta { font-size: .75rem; color: var(--muted); }
.rt-go { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--action); color: var(--on-action); display: grid; place-items: center; flex: none; }
.rt-go:disabled { opacity: .35; } .rt-go svg { width: 20px; height: 20px; }
.section-title h2 svg { width: 16px; height: 16px; vertical-align: -2px; }
#undo-bar { position: fixed; left: 12px; right: 12px; top: auto; height: auto; bottom: calc(var(--tab-h) + var(--safe-b) + var(--badge-h) + 20px); visibility: hidden; pointer-events: none; z-index: 60; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--text); color: var(--canvas); transform: translateY(150%); opacity: 0; transition: transform .25s, opacity .25s, visibility 0s linear .25s; }
/* v1.40.4: over-sheet must beat body.focus #undo-bar (same 1,1,0 otherwise set both top and bottom and stretch). height/top auto so it cannot fill the viewport. */
#undo-bar.over-sheet, body.focus #undo-bar.over-sheet { z-index: 110; top: calc(env(safe-area-inset-top, 0px) + 12px); bottom: auto; height: auto; transform: translateY(-150%); }
#undo-bar.show, #undo-bar.over-sheet.show, body.focus #undo-bar.show, body.focus #undo-bar.over-sheet.show { transform: none; opacity: 1; visibility: visible; pointer-events: auto; transition: transform .25s, opacity .25s, visibility 0s; } #undo-bar span { flex: 1; } #undo-bar button { background: none; border: 0; color: inherit; font-weight: 700; text-decoration: underline; min-height: 44px; min-width: 44px; }
.shared-list { margin: var(--s3) 0 0; padding-left: 1.2em; display: grid; gap: 6px; } .shared-list li span:last-child { float: right; }
.defi-hero .defi-ico svg { width: 40px; height: 40px; color: var(--action-text); }
.defi-ul { padding-left: 1.1em; display: grid; gap: 4px; color: var(--text-2); }
.defi-invite { border-color: var(--action); background: var(--action-soft); margin-bottom: var(--s3); gap: 8px; }
.board { list-style: none; margin: var(--s3) 0; padding: 0; display: grid; gap: 6px; counter-reset: none; }
.board li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.board.sm li { padding: 8px 10px; background: var(--surface-2); }
.board li.me { border-color: var(--action); box-shadow: inset 3px 0 0 var(--action); }
.board .pos { font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 1.4rem; width: 1.6ch; text-align: center; color: var(--muted); }
.board li:first-child .pos { color: var(--action-text); }
.board .val { font-weight: 700; font-variant-numeric: tabular-nums; }
.board .flag { color: var(--warning-text); display: block; }
.code16 { font-family: "Barlow Condensed", sans-serif; font-size: 1.6rem; letter-spacing: .12em; font-weight: 600; }
.ch16.ended { opacity: .8; }
.badges16 { display: flex; flex-wrap: wrap; gap: 8px; }
.badge16 { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .85rem; }
.section-title h2:has(svg) { display: flex; align-items: center; gap: 6px; }

/* ---------- v1.7 ---------- */
.imp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.imp-stats div { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; text-align: center; }
.imp-stats b { display: block; font-family: "Barlow Condensed", sans-serif; font-size: 1.8rem; line-height: 1; font-variant-numeric: tabular-nums; }
.imp-stats span { font-size: .78rem; color: var(--muted); }
.imp-list { display: grid; gap: 6px; }
.imp-row { display: grid; gap: 6px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.imp-row .strong, .imp-row .tiny { display: block; } .imp-row.todo { border-color: var(--warning); }
.imp-row select { min-height: 44px; }
.prog-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--s2) 0; }
.prog-meta span { padding: 6px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .85rem; }
.prog-ex li { align-items: center; }
.cal-d.planned { box-shadow: inset 0 0 0 2px var(--action-soft); } .cal-d.planned::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--action); display: block; margin: 1px auto 0; }
.ai-card { border-color: var(--action); }
.ai-h { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.1rem; } .ai-h svg { width: 20px; height: 20px; color: var(--action-text); }
.ai-recs { margin: var(--s3) 0; padding-left: 1.3em; display: grid; gap: 12px; } .ai-recs li.done { opacity: .7; }
.ai-recs li::marker { font-family: "Barlow Condensed", sans-serif; font-weight: 600; color: var(--action-text); }
.ai-err { color: var(--warning-text); } .ai-ok { color: var(--success); font-weight: 600; }
/* v1.7.1 */
.nut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: var(--s3); }
.nut-f > span:first-child { font-size: .8rem; color: var(--text-2); font-weight: 600; }
.nut-in { position: relative; display: block; margin-top: 4px; } .nut-in input { width: 100%; padding-right: 44px; font-size: 1.2rem; font-variant-numeric: tabular-nums; min-height: 48px; }
.nut-in em { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-size: .8rem; }
.nut-bar { display: block; height: 4px; border-radius: 2px; background: var(--surface-2); margin-top: 6px; overflow: hidden; } .nut-bar i { display: block; height: 100%; background: var(--action); }
.nut-weeks .num { text-align: right; font-weight: 600; }
.ai-body { margin: var(--s3) 0 0; }
/* v1.7.2 alert test flash */
body.flash-test::after{content:"";position:fixed;inset:0;pointer-events:none;z-index:9999;box-shadow:inset 0 0 0 10px var(--accent);animation:ft .4s steps(2) 4}
@keyframes ft{50%{box-shadow:inset 0 0 0 10px transparent}}
@media (prefers-reduced-motion:reduce){body.flash-test::after{animation:none}}
/* v1.7.4 iOS stale-viewport fix for bottom bars */
#vv-sentinel { position: fixed; left: 0; bottom: 0; width: 1px; height: 0; pointer-events: none; visibility: hidden; }
#tabbar, #dock { transform: translateY(var(--vv-fix, 0px)); }
body.kb-open #tabbar { visibility: hidden; }
/* v1.8.0 RIR help, cable machines, Wrapped */
.rir-help { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-left: 4px; border-radius: 50%; border: 1px solid var(--border-strong); background: transparent; color: var(--action-text); font: 700 .8rem var(--font-body); vertical-align: middle; }
.rir-chips .rir-chip { min-width: 44px; white-space: nowrap; }
.rir-scale { list-style: none; padding: 0; margin: var(--s3) 0; display: grid; gap: var(--s2); }
.rir-scale li { display: flex; gap: var(--s3); align-items: baseline; padding: var(--s2) var(--s3); border-radius: var(--r-control); background: var(--surface-2, rgba(255,255,255,.04)); }
.rir-scale b { min-width: 76px; font-family: var(--font-display, inherit); color: var(--action-text); }
.mc-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: var(--s2) 0 0; padding: 6px 12px; min-height: 36px; border-radius: 999px; border: 1px dashed var(--border-strong); background: transparent; color: var(--muted); font: 600 .8rem var(--font-body); }
.mc-chip svg { width: 16px; height: 16px; }
.mc-chip.on { border-style: solid; color: var(--text); background: var(--action-soft); }
.mc-chip small { flex-basis: 100%; font-weight: 500; color: var(--muted); }
.mc-guide summary { cursor: pointer; font-weight: 600; color: var(--action-text); padding: var(--s2) 0; }
.wr-teaser { display: flex; align-items: center; gap: var(--s3); margin: 0 0 var(--s4); padding: var(--s4); border-radius: var(--r-card, 16px); color: #fff; text-decoration: none; background: linear-gradient(120deg, var(--action), #8a3ffc 60%, #ff5c8a); }
.wr-teaser small { display: block; opacity: .85; font-size: .8rem; }
.wr { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: #0b0d12; color: #fff; padding: var(--safe-t) 0 var(--safe-b); }
.wr-top { display: flex; align-items: center; gap: var(--s2); padding: var(--s3); flex-wrap: wrap; }
.wr-top .btn { color: #fff; }
.wr-pick { display: flex; gap: 6px; margin-left: auto; }
.wr-pick a { padding: 6px 12px; border-radius: 999px; color: #c9d1e4; text-decoration: none; font-size: .8rem; border: 1px solid rgba(255,255,255,.15); }
.wr-pick a.on { background: #fff; color: #0b0d12; }
.wr-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.wr-track::-webkit-scrollbar { display: none; }
.wr-card { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; padding: var(--s5); }
.wr-in { width: 100%; max-width: 420px; aspect-ratio: 9 / 14; border-radius: 28px; padding: 32px 28px; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(160deg, #1b2340, #2b1450); box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.wr-vol .wr-in, .wr-pr .wr-in { background: linear-gradient(160deg, var(--action), #1b2340); }
.wr-streak .wr-in, .wr-month .wr-in { background: linear-gradient(160deg, #ff5c8a, #2b1450); }
.wr-fav .wr-in, .wr-tod .wr-in { background: linear-gradient(160deg, #17a673, #10233a); }
.wr-big { font: 800 clamp(3rem, 16vw, 5.5rem)/1 var(--font-display, system-ui); letter-spacing: -.03em; overflow-wrap: anywhere; }
.wr-big.sm { font-size: clamp(2rem, 9vw, 3rem); }
.wr-t { margin-top: 10px; font-size: 1.25rem; font-weight: 700; }
.wr-s { margin: 10px 0 0; color: rgba(255,255,255,.8); }
.wr-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4) var(--s4); }
.wr-dots { display: flex; gap: 5px; }
.wr-dots span { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.3); transition: width .2s; }
.wr-dots span.on { width: 18px; background: #fff; }
@media (prefers-reduced-motion: reduce) { .wr-track { scroll-behavior: auto; } .wr-dots span { transition: none; } }
.set-flags { padding: 4px 0 8px; }
.set-fb { margin: 0 0 6px; font-size: .82rem; color: var(--text); padding: 6px 10px; border-left: 3px solid var(--action); background: var(--action-soft); border-radius: 0 8px 8px 0; }
.sf-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.sf { min-height: 32px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-strong); background: transparent; color: var(--muted); font: 600 .75rem var(--font-body); }
.sf.on { color: #fff; background: #c2410c; border-color: #c2410c; }
.conseq { list-style: none; padding: 0; margin: 0 0 var(--s4); display: grid; gap: var(--s3); text-align: left; }
.conseq ul { margin: 4px 0 0; padding-left: 18px; }
.coach-tl { list-style: none; padding: 0 0 0 14px; margin: 0 0 var(--s4); border-left: 2px solid var(--border-strong); display: grid; gap: var(--s2); }
.coach-tl li { position: relative; } .coach-tl li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--action); }
/* v1.8.1 routine diff */
.rd-sym { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-weight: 800; background: var(--action-soft); color: var(--action-text); }
.rd-add .rd-sym { background: rgba(23,166,115,.18); color: #17a673; } .rd-del .rd-sym { background: rgba(194,65,12,.18); color: #e2622b; }
.actions.col { display: grid; gap: var(--s2); } .rd-never { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: var(--s2); }
/* v1.8.2 resume */
#resume-btn { position: fixed; left: 50%; transform: translateX(-50%) translateY(var(--vv-fix, 0px)); bottom: calc(var(--tab-h) + var(--safe-b) + var(--badge-h) + 78px); z-index: 35; padding: 10px 16px; min-height: 44px; border-radius: 999px; border: 0; background: var(--action); color: var(--on-action, #fff); font: 700 .9rem var(--font-body); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
#resume-btn[hidden] { display: none; }
.set-row.cur-flash, .cur-flash { animation: curflash 1.6s ease-out; border-radius: 10px; }
@keyframes curflash { 0%, 40% { box-shadow: 0 0 0 3px var(--action); } 100% { box-shadow: 0 0 0 3px transparent; } }
@media (prefers-reduced-motion: reduce) { .cur-flash { animation: none; box-shadow: 0 0 0 3px var(--action); } }
.ex-rest { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.stepper.sm button { width: 32px; height: 32px; } .stepper.sm .v { min-width: 44px; font-size: .85rem; }

/* =================== v1.9.0 Motion system ===================
   Tokens: fast 120 / base 200 / slow 360 / focal 700 ms. Arrival curve = --ease (expo out). --spring only for
   celebrations (one small overshoot). Only transform + opacity animate. Gated by html.anim-full / anim-reduced /
   anim-none (Réglages > Animations, default follows prefers-reduced-motion). */
:root { --m-focal: 700ms; --spring: cubic-bezier(.34, 1.4, .64, 1); --gold: #ffd166; }
@supports (transition-timing-function: linear(0, 1)) { :root { --spring: linear(0, .25 9%, .62 19%, .94 31%, 1.06 40%, 1.08 46%, 1.04 58%, 1 72%, 1); } }
html.anim-none *, html.anim-none *::before, html.anim-none *::after { animation: none !important; transition: none !important; }
html.anim-reduced *, html.anim-reduced *::before, html.anim-reduced *::after { animation-duration: 160ms !important; animation-iteration-count: 1 !important; transition-duration: 120ms !important; }

/* 13. micro-interactions: press, sheet spring, toast slide */
html:not(.anim-none) :is(.btn, .list-item, .chip, .icon-btn, .mini-btn, .set-check, .set-num, .rir-chip, .sf, .mc-chip, .seg button, #tabbar a, .card.tap, .wr-teaser):active { transform: scale(.97); }
:is(.btn, .chip, .icon-btn, .mini-btn, .set-check, .set-num, .rir-chip, .sf, .mc-chip, .seg button, #tabbar a, .wr-teaser) { transition: transform var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
html.anim-full .sheet { transition: transform 420ms var(--spring); }
html.anim-full .sheet-backdrop:not(.open) .sheet { transition: transform var(--dur-base) cubic-bezier(.4, 0, 1, 1); }
#toast { transition: transform var(--dur-slow) var(--ease), opacity var(--dur-base) var(--ease); }
#tabbar a svg { transition: transform var(--dur-base) var(--ease); }
html.anim-full #tabbar a.on svg { transform: translateY(-1px) scale(1.08); }

/* view enter (navigation / tab switch): content rises, lists stagger (max 6 items) */
@keyframes v-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes v-fade { from { opacity: 0; } }
html.anim-full #view.v-enter > * { animation: v-rise var(--dur-slow) var(--ease) both; }
html.anim-full #view.v-enter > :nth-child(2) { animation-delay: 40ms; } html.anim-full #view.v-enter > :nth-child(3) { animation-delay: 80ms; } html.anim-full #view.v-enter > :nth-child(n+4) { animation-delay: 120ms; }
html.anim-full #view.v-enter .list > :nth-child(-n+6), html.anim-full #view.v-enter .board > li { animation: v-rise var(--dur-slow) var(--ease) both; animation-delay: calc(120ms + var(--i, 0) * 30ms); }
html.anim-full #view.v-enter .list > :nth-child(2) { --i: 1; } html.anim-full #view.v-enter .list > :nth-child(3) { --i: 2; } html.anim-full #view.v-enter .list > :nth-child(4) { --i: 3; } html.anim-full #view.v-enter .list > :nth-child(5) { --i: 4; } html.anim-full #view.v-enter .list > :nth-child(6) { --i: 5; }
html.anim-reduced #view.v-enter > * { animation: v-fade 160ms linear both; }

/* skeleton */
.skel { height: 14px; margin: 10px 0; border-radius: 7px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%); background-size: 200% 100%; }
.skel-l { height: 22px; width: 60%; } .skel-s { width: 40%; }
html.anim-full .skel { animation: skel 1.2s linear infinite; } @keyframes skel { to { background-position: -200% 0; } }

/* 2. set validated: check draws, row fills left → right */
.set-row { position: relative; isolation: isolate; }
.set-row.done::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--success-soft); transform-origin: left center; }
.set-row.done { background: transparent; }
html.anim-full .set-row.pop { animation: none; }
html.anim-full .set-row.pop::before { animation: fill-x 380ms var(--ease) both; }
@keyframes fill-x { from { transform: scaleX(0); } }
html.anim-full .set-row.pop .set-check svg path { stroke-dasharray: 22; animation: draw 320ms 60ms var(--ease) both; }
html.anim-full .set-row.pop .set-check { animation: check-pop 420ms var(--spring); }
@keyframes draw { from { stroke-dashoffset: 22; } }
@keyframes check-pop { 0% { transform: scale(.82); } 100% { transform: scale(1); } }
html.anim-reduced .set-row.pop::before { animation: v-fade 160ms linear both; }

/* 1. PR: persistent badge, gold shimmer on the numbers */
.set-num { position: relative; }
.pr-pill { position: absolute; top: -6px; right: -6px; padding: 1px 5px; border-radius: 6px; font: 800 .6rem/1.3 var(--font-body); letter-spacing: .04em; color: #3b2a00; background: var(--gold); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
html.anim-full .set-row.pr-hit .set-in { animation: pr-scale 700ms var(--spring); color: var(--gold); background-image: linear-gradient(110deg, transparent 30%, rgba(255,209,102,.55) 50%, transparent 70%); background-size: 250% 100%; animation-name: pr-scale, shimmer; animation-duration: 700ms, 1100ms; animation-timing-function: var(--spring), linear; }
html.anim-full .set-row.pr-hit .pr-pill { animation: check-pop 500ms var(--spring); }
@keyframes pr-scale { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -100% 0; } }
#fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 400; }

/* 3. countdown */
#cd { position: fixed; inset: 0; z-index: 380; display: grid; place-items: center; background: color-mix(in srgb, var(--canvas) 88%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: v-fade var(--dur-base) var(--ease); }
#cd.out { opacity: 0; transition: opacity var(--dur-base) var(--ease); }
.cd-n { font: 800 clamp(6rem, 38vw, 11rem)/1 var(--font-display, var(--font-num)); color: var(--action-text); font-variant-numeric: tabular-nums; }
.cd-n.go { animation: cd-in 640ms var(--ease) both; }
@keyframes cd-in { 0% { opacity: 0; transform: scale(1.6); } 30% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(.9); } }
.cd-skip { position: absolute; bottom: calc(var(--safe-b) + 40px); left: 50%; transform: translateX(-50%); padding: 10px 18px; min-height: 44px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 600; }

/* 4. session end: medal drops, count-up (JS), 12. muscle map lights up */
html.anim-full .sheet-hero .hero-ico { animation: medal 760ms 120ms var(--spring) both; }
@keyframes medal { 0% { opacity: 0; transform: translateY(-48px) rotate(-12deg); } 60% { opacity: 1; } 100% { transform: none; } }
.sum-mm .mm-card { margin-top: var(--s3); } .sum-mm .mm-card > :not(svg):not(.row) { display: none; }
html.anim-full .sum-mm .mm-r:not(.mm-none) { animation: mm-light 520ms var(--d, 300ms) var(--ease) both; }
@keyframes mm-light { from { opacity: .15; } }

/* 5. rest end: soft screen pulse + burst on the rest bar */
body.pulse-end::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 255; background: radial-gradient(circle at 50% 100%, color-mix(in srgb, var(--action) 35%, transparent), transparent 70%); animation: pulse-end 900ms var(--ease) both; }
@keyframes pulse-end { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
#restbar { position: relative; }
.rb-burst { position: absolute; left: 50%; top: 50%; width: 80px; height: 80px; margin: -40px 0 0 -40px; border-radius: 50%; border: 3px solid var(--action); pointer-events: none; animation: rb-burst 650ms var(--ease) both; }
@keyframes rb-burst { from { opacity: 1; transform: scale(.3); } to { opacity: 0; transform: scale(3); } }

/* 6. coach load increase: arrow rises with a sparkle */
.rx-arrow { display: inline-block; margin-right: 3px; font-weight: 800; }
html.anim-full .rx-up .rx-arrow { animation: rise 700ms var(--spring) both; }
html.anim-full .rx-up { position: relative; }
html.anim-full .rx-up::after { content: "✦"; position: absolute; right: -10px; top: -8px; font-size: .7rem; color: var(--gold); animation: sparkle 900ms 200ms var(--ease) both; }
@keyframes rise { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: none; } }
@keyframes sparkle { 0% { opacity: 0; transform: scale(.2) rotate(0); } 40% { opacity: 1; transform: scale(1.2) rotate(40deg); } 100% { opacity: 0; transform: scale(.6) rotate(90deg); } }

/* 7. weekly streak flame (size grows with weeks, gentle flicker only while on screen) */
.streak-cell { position: relative; }
.flame { display: inline-block; width: 22px; height: 28px; margin-right: 4px; vertical-align: -6px; transform: scale(var(--fs, 1)); transform-origin: 50% 100%; }
.flame svg { width: 100%; height: 100%; overflow: visible; } .fl-o { fill: #ff7a1a; } .fl-i { fill: #ffd166; }
.flame.off .fl-o, .flame.off .fl-i { fill: var(--border-strong); }
html.anim-full .flame:not(.off) .fl-i { transform-origin: 50% 100%; animation: flicker 1.8s ease-in-out 3; }
html.anim-full .flame.grow { animation: flame-grow 800ms var(--spring) both; }
@keyframes flicker { 50% { transform: scaleY(.88) scaleX(1.05); } }
@keyframes flame-grow { from { transform: scale(calc(var(--fs, 1) * .5)); opacity: .3; } }

/* 8. défis podium: avatars climb */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: var(--s4) 0; }
.pd { display: flex; flex-direction: column; align-items: center; width: 30%; max-width: 110px; }
.pd-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface-2); border: 2px solid var(--border-strong); }
.pd.me .pd-av { border-color: var(--action); color: var(--action-text); }
.pd-name { margin: 4px 0; font-size: .75rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-step { width: 100%; display: grid; place-items: center; border-radius: 10px 10px 0 0; font: 800 1.2rem var(--font-num); background: var(--surface-2); }
.pd-1 .pd-step { height: 84px; background: linear-gradient(180deg, var(--gold), #c99a2e); color: #3b2a00; } .pd-2 .pd-step { height: 60px; } .pd-3 .pd-step { height: 44px; }
html.anim-full .podium.climb .pd-step { transform-origin: bottom; animation: step-up 600ms var(--ease) both; }
html.anim-full .podium.climb :is(.pd-av, .pd-name) { animation: climb 700ms var(--spring) both; }
html.anim-full .podium.climb .pd-1 > * { animation-delay: 260ms; } html.anim-full .podium.climb .pd-2 > * { animation-delay: 120ms; }
@keyframes step-up { from { transform: scaleY(0); } }
@keyframes climb { from { opacity: 0; transform: translateY(60px); } }

/* 9. badge unlocked: card flip with glossy sheen */
.badge-pop { position: fixed; inset: 0; z-index: 390; display: grid; place-items: center; background: rgba(0,0,0,.45); opacity: 0; transition: opacity var(--dur-base) var(--ease); perspective: 900px; }
.badge-pop.in { opacity: 1; } .badge-pop.out { opacity: 0; }
.bp-card { position: relative; width: 210px; height: 260px; transform-style: preserve-3d; transform: rotateY(180deg); transition: transform 760ms var(--spring); }
.badge-pop.in .bp-card { transform: rotateY(0); }
html:not(.anim-full) .bp-card { transform: none; transition: none; }
.bp-face { position: absolute; inset: 0; border-radius: 20px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px; overflow: hidden; }
.bp-back { transform: rotateY(180deg); background: repeating-linear-gradient(45deg, #1b2340 0 10px, #222b4d 10px 20px); }
.bp-front { background: linear-gradient(160deg, #2b2f45, #14161f); border: 1px solid rgba(255,209,102,.5); color: #fff; }
.bp-front b { font-size: 1.15rem; } .bp-front small { color: #c9d1e4; }
.bp-ico { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold) 45%, #b8862b); color: #3b2a00; }
.bp-ico svg { width: 36px; height: 36px; }
.bp-front::after { content: ""; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.35) 50%, transparent 60%); transform: translateX(-60%); }
html.anim-full .badge-pop.in .bp-front::after { animation: sheen 1100ms 650ms var(--ease) both; }
@keyframes sheen { to { transform: translateX(60%); } }

/* 10. onboarding welcome */
html.anim-full .ob-hero .ob-logo { animation: medal 800ms var(--spring) both; }
html.anim-full .ob-hero h1, html.anim-full .ob-hero p { animation: v-rise 500ms var(--ease) both; }
html.anim-full .ob-hero h1 { animation-delay: 180ms; } html.anim-full .ob-hero p { animation-delay: 280ms; }

/* 11. Wrapped: card content arrives when the card snaps in */
html.anim-full .wr-card .wr-in > * { opacity: 0; transform: translateY(16px); transition: opacity 420ms var(--ease), transform 520ms var(--ease); }
html.anim-full .wr-card.in .wr-in > * { opacity: 1; transform: none; }
html.anim-full .wr-card.in .wr-t { transition-delay: 90ms; } html.anim-full .wr-card.in .wr-s { transition-delay: 180ms; }
html.anim-full .wr-card .wr-in { transition: transform 500ms var(--ease); transform: scale(.94); } html.anim-full .wr-card.in .wr-in { transform: none; }

/* v1.9 Apple-like depth + transitions */
html:not(.anim-none) #tabbar { background: color-mix(in srgb, var(--tab-bg) 80%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px); }
.sheet-backdrop.open { background: color-mix(in srgb, var(--backdrop) calc(var(--bd, 1) * 100%), transparent); }
html.anim-full .sheet-backdrop.open { -webkit-backdrop-filter: blur(calc(var(--bd, 1) * 2px)); backdrop-filter: blur(calc(var(--bd, 1) * 2px)); }
.sheet-backdrop.dragging { transition: none; }
.sheet { overscroll-behavior-y: none; touch-action: pan-y; }
.sheet .grab { position: relative; cursor: grab; touch-action: none; }
.sheet .grab::before { content: ""; position: absolute; inset: -14px -60px; } /* larger hit area */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 260ms; animation-timing-function: cubic-bezier(.2, .9, .25, 1); }
::view-transition-old(root) { animation-name: vt-out; } ::view-transition-new(root) { animation-name: vt-in; }
@keyframes vt-out { to { opacity: 0; transform: scale(.985); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
::view-transition-group(hero) { animation-duration: 340ms; animation-timing-function: cubic-bezier(.2, .9, .25, 1); }
::view-transition-group(*) { animation-duration: 300ms; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }
html.anim-reduced ::view-transition-old(root), html.anim-reduced ::view-transition-new(root) { animation: v-fade 140ms linear; }
.dr-w { display: inline-flex; font-variant-numeric: tabular-nums; }
.dr { display: inline-block; height: 1.15em; line-height: 1.15em; overflow: hidden; vertical-align: bottom; }
.dr-s { display: block; will-change: transform; }

/* v1.10 sheet detents */
.sheet-backdrop.open .sheet { transform: translateY(var(--dy, 0px)); }
.sheet.at-half, .sheet.at-half .scroll { overflow: hidden; }
.sheet[data-detent] .grab { margin-bottom: var(--s3); }

/* v1.10 autoregulation hint */
.ar-hint { display: flex; align-items: center; gap: 8px; margin: 4px 0 6px; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--action) 12%, var(--surface)); font-size: 14px; }
.ar-hint.down { background: color-mix(in srgb, var(--warning) 14%, var(--surface)); }
.ar-hint .ar-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--action); color: var(--on-action); flex: none; }
.ar-hint.down .ar-ic { background: var(--warning); color: #1b1300; }
.ar-hint .grow { min-width: 0; }
.ar-btn { min-height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-size: 13px; }
.ar-btn.ok { background: var(--surface); }
html.anim-full .ar-hint.fresh { animation: ar-in 420ms cubic-bezier(.2, .9, .25, 1.05) both; }
html.anim-full .ar-hint.fresh .ar-ic { animation: ar-ic 600ms 120ms cubic-bezier(.2, .9, .25, 1.2) both; }
html.anim-full .ar-hint.fresh + .set-row .set-in[data-field="w"] { animation: ar-flash 900ms 200ms ease-out both; }
html.anim-reduced .ar-hint.fresh { animation: v-fade 160ms linear both; }
@keyframes ar-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes ar-ic { from { transform: translateY(6px); opacity: 0; } }
.ar-hint.down.fresh .ar-ic { animation-name: ar-ic-d; } @keyframes ar-ic-d { from { transform: translateY(-6px); opacity: 0; } }
@keyframes ar-flash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--action) 55%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }

/* v1.10 plate preview */
.plate-mini { display: flex; align-items: center; gap: 10px; width: 100%; margin: 2px 0 6px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--border); background: transparent; color: var(--text); text-align: left; font: inherit; min-height: 48px; }
.plate-mini .pm-svg { width: 104px; flex: none; } .plate-mini .pm-svg svg { width: 100%; height: auto; display: block; }
.plate-mini .pm-t { display: flex; flex-direction: column; min-width: 0; }

/* v1.10 smart home */
.today { position: relative; overflow: hidden; }
.today .td-name { font-size: 26px; margin: 4px 0 2px; letter-spacing: -.01em; }
.today .td-lines { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.today .td-lines li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.today .td-lines li .num { color: var(--text-2); white-space: nowrap; }
.done-today .td-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); flex: none; margin-right: 10px; }
.insights { display: grid; gap: 8px; margin-top: var(--s3); }
.insight { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; min-height: 52px; }
.insight .grow { display: flex; flex-direction: column; min-width: 0; }
.in-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--action) 16%, transparent); color: var(--action); flex: none; }
.in-ic.gold { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold); }
.in-ic.warm { background: color-mix(in srgb, #ff8a3d 18%, transparent); color: #ff8a3d; }
.in-ic svg, .td-ic svg, .fc-ic svg { width: 18px; height: 18px; }
html.anim-full .insights > * { animation: v-rise 380ms cubic-bezier(.2, .9, .25, 1) both; }
html.anim-full .insights > :nth-child(2) { animation-delay: 60ms; } html.anim-full .insights > :nth-child(3) { animation-delay: 120ms; }
@keyframes v-rise { from { opacity: 0; transform: translateY(8px); } }

/* v1.10 forecast */
.fc-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); flex: none; margin-right: 10px; }
.fc-bar { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; margin: 12px 0 4px; }
.fc-bar span { display: block; height: 100%; width: var(--p); border-radius: 4px; background: linear-gradient(90deg, var(--action), var(--gold)); transform-origin: left; }
html.anim-full .fc-bar span { animation: fc-grow 900ms 150ms cubic-bezier(.2, .9, .25, 1) both; }
@keyframes fc-grow { from { transform: scaleX(0); } }

/* v1.10 history + compare */
.hist-search { margin: 0 0 8px; }
.pick-wrap { position: relative; border-radius: var(--r-card, 16px); transition: transform 160ms ease; cursor: pointer; }
.pick-wrap .h-card { margin: 0; }
.pick-wrap.on .h-card { outline: 2px solid var(--action); outline-offset: -2px; }
.pick-dot { position: absolute; right: 12px; top: 12px; z-index: 1; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border-strong, var(--border)); display: grid; place-items: center; font-size: 12px; background: var(--surface); }
.pick-wrap.on .pick-dot { background: var(--action); border-color: var(--action); color: var(--on-action); }
.pick-dot svg { width: 14px; height: 14px; }
.pick-wrap .chev { visibility: hidden; }
.cmp-go { position: sticky; bottom: calc(var(--tab-h, 64px) + var(--safe-b) + 12px); z-index: 5; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
html.anim-full .cmp-go { animation: v-rise 320ms cubic-bezier(.2, .9, .25, 1.05) both; }
.cmp-head { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 8px 72px; }
.cmp-col { display: flex; flex-direction: column; min-width: 0; }
.cmp-r { display: grid; grid-template-columns: 64px 1fr 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.cmp-r:last-child { border-bottom: 0; } .cmp-r .l { color: var(--text-2); }
.cmp-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.cmp-2 > div { display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; }
.dlt { font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 8px; white-space: nowrap; }
.dlt.up { color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
.dlt.down { color: var(--danger-text); background: color-mix(in srgb, var(--danger-text) 14%, transparent); }
.dlt.eq { color: var(--text-2); background: var(--border); }

.ok-text { color: var(--success); } .warn-text { color: var(--warning-text); }
.sheet[data-detent] .actions { position: relative; z-index: 2; background: var(--sheet-bg); transform: translateY(calc(-1 * var(--pin, 0px))); box-shadow: 0 -12px 16px -8px var(--sheet-bg); padding-bottom: 4px; }
html.anim-full .sheet[data-detent]:not(.dragging) .actions { transition: transform 420ms var(--spring); }

/* v1.11 ghost mode */
.gh-row { display: flex; align-items: center; gap: 10px; margin: 2px 0 6px; padding: 6px 6px 6px 10px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--text) 22%, transparent); background: color-mix(in srgb, var(--text) 4%, transparent); min-height: 48px; }
.gh-t { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; opacity: .72; font-size: 14px; }
.gh-t svg, .gh-vs svg, .rc-ghost svg { flex: none; opacity: .8; }
.gh-t .ellipsis { display: block; }
.rc-open { flex: none; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; }
.rc-open sup { font-size: 10px; color: var(--action-text); }
.gh-vs { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 4px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.gh-vs.up { color: var(--success); background: var(--success-soft); }
.gh-vs.down { color: var(--text-2); background: color-mix(in srgb, var(--text) 7%, transparent); }
.gh-vs.eq { color: var(--text-2); background: color-mix(in srgb, var(--text) 5%, transparent); }
html.anim-full .gh-vs.up { animation: v-rise 360ms cubic-bezier(.2, .9, .25, 1.05) both; }
.vbt-line { margin: 0 0 4px 4px; }
.rir-chip.est { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--action) 55%, transparent); position: relative; }
.rir-chip.est::after { content: "estimé"; position: absolute; left: 50%; bottom: -15px; transform: translateX(-50%); font-size: 10px; color: var(--action-text); white-space: nowrap; }
.rir-done .est { border-style: dashed; }

/* v1.11 rep counter overlay */
.rc { position: fixed; inset: 0; z-index: 140; display: flex; align-items: flex-end; justify-content: center; background: transparent; transition: background-color 260ms ease; }
.rc.open { background: var(--backdrop); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.rc-card { width: 100%; max-width: var(--content-max); max-height: 96dvh; overflow: auto; background: var(--sheet-bg); border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding: var(--s4) var(--s4) calc(var(--s4) + var(--safe-b)); transform: translateY(100%); transition: transform 420ms var(--spring); }
.rc.open .rc-card { transform: none; }
html.anim-none .rc-card, html.anim-none .rc { transition: none; }
.rc-top { display: flex; align-items: center; justify-content: space-between; }
.rc .beta { font-size: 12px; vertical-align: super; color: var(--action-text); }
.rc-steps { padding-left: 20px; margin: 10px 0; display: grid; gap: 8px; font-size: 15px; }
.rc-live { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 0 4px; }
.rc-ring { width: 210px; height: 210px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 6px solid color-mix(in srgb, var(--action) 30%, transparent); }
.rc-n { font-size: 96px; font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
html:not(.anim-none) .rc-ring.hit { animation: rc-hit 380ms cubic-bezier(.2, .9, .25, 1.2); }
html:not(.anim-none) .rc-ring.hit .rc-n { animation: rc-pop 380ms cubic-bezier(.2, .9, .25, 1.3); }
html:not(.anim-none) .rc-ring.part { animation: rc-part 420ms ease-out; }
@keyframes rc-hit { 0% { border-color: var(--action); box-shadow: 0 0 0 0 color-mix(in srgb, var(--action) 45%, transparent); } 100% { box-shadow: 0 0 0 22px transparent; } }
@keyframes rc-pop { 0% { transform: scale(.86); opacity: .6; } 100% { transform: none; } }
@keyframes rc-part { 0%, 100% { border-color: color-mix(in srgb, var(--action) 30%, transparent); } 30% { border-color: var(--warning); } }
.rc-vel { width: 70%; height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; }
.rc-vel span { display: block; height: 100%; background: linear-gradient(90deg, var(--warning), var(--success)); transform-origin: left; transform: scaleX(1); transition: transform 300ms cubic-bezier(.2, .9, .25, 1); }
.rc-ghost { display: flex; align-items: center; gap: 6px; opacity: .75; }
.rc-sum { text-align: center; padding-top: 8px; }
.rc-big { font-size: 88px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.rc-adj { display: inline-flex; gap: 10px; margin: 10px 0; }
.rc-kpis { list-style: none; padding: 0; margin: 8px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.rc-kpis li { display: flex; flex-direction: column; padding: 10px; border-radius: 12px; background: var(--surface); }
.rc-kpis b { font-size: 22px; } .rc-kpis span { font-size: 12px; color: var(--text-2); }
body.rc-on { overflow: hidden; }
.rc .actions { display: flex; gap: var(--s3); margin-top: var(--s5); } .rc .actions > * { flex: 1; }

/* ===== v1.12 Potes: ranks, season board, rank-up, library segmented nav ===== */
.lib-seg, .potes-seg { margin: 0 0 var(--s3); }
.seg a { flex: 1; min-height: 40px; display: grid; place-items: center; border-radius: calc(var(--r-card) - 3px); font-weight: var(--fw-strong); font-size: var(--fs-small); color: var(--muted); text-decoration: none; }
.seg a.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--action); }
.potes-seg button { position: relative; }
.dot-badge { position: absolute; top: 4px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger, #e5484d); color: #fff; font-size: .7rem; line-height: 18px; font-weight: 700; }
.rk-img { display: block; border-radius: 50%; object-fit: cover; background: var(--rk, var(--surface-2)); }
.rk-mini { padding: 0; overflow: hidden; border: 2px solid var(--rk); background: var(--rk); }
.rk-mini .rk-img { width: 100%; height: 100%; }
.rk-hero { position: relative; overflow: hidden; text-align: center; padding: var(--s5, 24px) var(--s4, 16px) var(--s4, 16px);
  background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--rk) 34%, transparent), transparent 70%), var(--surface); border-color: color-mix(in srgb, var(--rk) 40%, var(--border)); }
.rk-medal { position: relative; width: 148px; height: 148px; margin: 0 auto var(--s3); }
.rk-medal .rk-img { position: relative; width: 148px; height: 148px; box-shadow: 0 0 0 4px rgba(255,255,255,.85), 0 14px 34px -10px color-mix(in srgb, var(--rk) 70%, #000); }
.rk-glow { position: absolute; inset: -22px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--rk) 55%, transparent), transparent 68%); filter: blur(6px); }
html.anim-full .rk-glow { animation: rk-breathe 4.8s ease-in-out infinite; }
@keyframes rk-breathe { 50% { transform: scale(1.06); opacity: .75; } }
.rk-kicker { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); font-weight: 600; }
.rk-name { font-size: 2rem; line-height: 1.1; margin: 4px 0 2px; letter-spacing: -.01em; }
.rk-pts { font-size: 1.05rem; color: var(--text-2); } .rk-pts .num { font-size: 1.5rem; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.rk-bar { height: 8px; border-radius: 4px; background: var(--sunken, rgba(127,127,127,.18)); overflow: hidden; margin: var(--s3) auto var(--s2); max-width: 320px; }
.rk-bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--rk) 70%, #fff), var(--rk)); transform-origin: left; transform: scaleX(var(--f)); }
html.anim-full .rk-bar i { animation: rk-fill 900ms 150ms var(--spring) both; }
@keyframes rk-fill { from { transform: scaleX(0); } }
.rk-actions { margin-top: var(--s3); display: flex; justify-content: center; }
.rk-parts { display: grid; gap: var(--s3); }
.rk-part .num { font-variant-numeric: tabular-nums; }
.rk-pbar { height: 6px; border-radius: 3px; background: var(--sunken, rgba(127,127,127,.18)); overflow: hidden; margin: 6px 0 4px; }
.rk-pbar i { display: block; height: 100%; background: var(--action); transform-origin: left; transform: scaleX(var(--f)); border-radius: inherit; }
html.anim-full .rk-pbar i { animation: rk-fill 800ms 250ms var(--spring) both; }
.rk-ladder { display: flex; gap: var(--s3); overflow-x: auto; padding: 4px 2px var(--s2); scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rk-ladder::-webkit-scrollbar { display: none; }
.rk-step { flex: none; width: 84px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; scroll-snap-align: center; }
.rk-step .rk-img { width: 64px; height: 64px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px color-mix(in srgb, var(--rk) 50%, transparent); }
.rk-step.cur .rk-img { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--rk); }
.rk-step.lock .rk-img { filter: grayscale(.85) brightness(.75); opacity: .55; }
.rk-step-n { font-size: .8rem; font-weight: 600; }
.rk-step.cur .rk-step-n { color: var(--text); }
.rk-strip { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.rk-strip::-webkit-scrollbar { display: none; }
.rk-chip { flex: none; width: 76px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: .8rem; }
.rk-chip.me { border-color: var(--action); }
.rk-chip .ellipsis { max-width: 68px; font-weight: 600; }
.rk-how summary { cursor: pointer; list-style: none; } .rk-how summary::-webkit-details-marker { display: none; }
.rk-how summary::after { content: "›"; float: right; transition: transform var(--dur-fast) var(--ease); }
.rk-how[open] summary::after { transform: rotate(90deg); }
.rk-how ul { padding-left: 1.1em; display: grid; gap: 6px; margin: var(--s3) 0 var(--s2); }
.rk-how { margin-top: var(--s4, 16px); }
.rk-board .rk-av, .rk-friend .rk-av { flex: none; width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 2px color-mix(in srgb, var(--rk) 60%, transparent); }
.rk-board .rk-av .rk-img, .rk-friend .rk-av .rk-img { width: 40px; height: 40px; }
.rk-tn { display: block; }
.rk-up-tag { color: var(--success, #2fbf71); font-size: .7rem; }
.rk-friend { gap: 12px; padding: 10px 12px; }
.rk-season { border-left: 3px solid var(--action); }
.rk-invite .code16 { user-select: all; }
/* rank-up: medallion rises on a spring, old rank dissolves, light sweep, then restrained gold sparks */
.rk-up { position: fixed; inset: 0; z-index: 395; display: grid; place-items: center; padding: 24px; background: rgba(6,8,14,.55); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); opacity: 0; transition: opacity 260ms var(--ease); }
.rk-up.in { opacity: 1; } .rk-up.out { opacity: 0; transition-duration: 240ms; }
.rk-up-card { width: min(340px, 100%); text-align: center; color: #fff; padding: 28px 22px 22px; border-radius: 28px; background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--rk) 55%, #12151f), #12151f 72%); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); transform: translateY(24px) scale(.94); transition: transform 620ms var(--spring); }
.rk-up.in .rk-up-card { transform: none; }
.rk-up .muted { color: rgba(255,255,255,.72); }
.rk-up .rk-kicker { color: rgba(255,255,255,.75); margin-top: 6px; }
.rk-up-name { font-size: 2.2rem; margin: 2px 0 6px; letter-spacing: -.01em; }
.rk-up-medal { position: relative; width: 168px; height: 168px; margin: 0 auto 10px; }
.rk-up-medal .rk-img { width: 168px; height: 168px; box-shadow: 0 0 0 4px rgba(255,255,255,.9), 0 18px 40px -12px rgba(0,0,0,.6); }
.rk-old, .rk-new, .rk-sheen, .rk-ray { position: absolute; inset: 0; border-radius: 50%; }
.rk-old { opacity: 0; } .rk-sheen { overflow: hidden; pointer-events: none; }
.rk-sheen::after { content: ""; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%); transform: translateX(-70%); }
.rk-ray { inset: -40px; background: radial-gradient(circle, color-mix(in srgb, var(--rk) 70%, #fff) 0, transparent 66%); opacity: .55; filter: blur(8px); }
html.anim-full .rk-up.in .rk-old { animation: rk-old 700ms 120ms var(--ease) both; }
html.anim-full .rk-up.in .rk-new { animation: rk-new 900ms 380ms var(--spring) both; }
html.anim-full .rk-up.in .rk-sheen::after { animation: sheen 1100ms 900ms var(--ease) both; }
html.anim-full .rk-up.in .rk-ray { animation: rk-ray 1400ms 360ms var(--ease) both; }
html.anim-full .rk-up.in .rk-kicker, html.anim-full .rk-up.in .rk-up-name, html.anim-full .rk-up.in p, html.anim-full .rk-up.in .rk-up-actions { animation: v-rise 520ms var(--ease) both; }
html.anim-full .rk-up.in .rk-kicker { animation-delay: 700ms; } html.anim-full .rk-up.in .rk-up-name { animation-delay: 780ms; } html.anim-full .rk-up.in p { animation-delay: 860ms; } html.anim-full .rk-up.in .rk-up-actions { animation-delay: 940ms; }
@keyframes rk-old { 0% { opacity: 1; transform: scale(1); filter: blur(0); } 100% { opacity: 0; transform: scale(.82); filter: blur(6px); } }
@keyframes rk-new { 0% { opacity: 0; transform: scale(.55) rotate(-8deg); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes rk-ray { 0% { opacity: 0; transform: scale(.6); } 40% { opacity: .9; } 100% { opacity: .5; transform: scale(1); } }
.rk-up-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.rk-up-actions .btn { flex: 1; }
.rk-up .btn.soft { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.18); }

/* v1.13 Vérifier ma séance */
.chk-head { display: flex; align-items: center; gap: var(--s3); }
.chk-head h2 { margin: 0; }
.chk-score { position: relative; width: 64px; height: 64px; flex: none; }
.chk-ring { width: 64px; height: 64px; transform: rotate(-90deg); }
.chk-ring circle { fill: none; stroke-width: 6; }
.chk-ring .trk { stroke: var(--border); }
.chk-ring .val { stroke: var(--success); stroke-linecap: round; stroke-dashoffset: var(--off); transition: stroke-dashoffset .9s cubic-bezier(.2, .9, .25, 1.05); }
.chk-ring .val.from0 { stroke-dashoffset: 163.4; transition: none; }
.chk-score.mid .val { stroke: var(--warning); } .chk-score.low .val { stroke: var(--danger-text); }
.chk-score .n { position: absolute; inset: 0; display: grid; place-items: center; font-weight: var(--fw-strong); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.chk-types { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--sunken); }
.chk-types button { flex: 1; min-height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font: inherit; font-size: var(--fs-small); font-weight: var(--fw-strong); transition: background .25s, color .25s, transform .2s; }
.chk-types button.on { background: var(--sheet-bg); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.chk-types button:active { transform: scale(.96); }
.chk-verdict { font-size: var(--fs-small); color: var(--text-2); line-height: 1.45; }
.chk-chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.chk-chip { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface, transparent); font-size: var(--fs-small); color: var(--text); }
.chk-chip .nm { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chk-chip .v { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .8em; white-space: nowrap; }
.chk-chip .dot, .chk-legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.s-covered .dot, .chk-legend .s-covered i { background: var(--success); }
.s-light .dot, .chk-legend .s-light i { background: var(--warning); }
.s-missing .dot, .chk-legend .s-missing i { background: transparent; box-shadow: inset 0 0 0 2px var(--danger-text); }
.s-recent .dot, .chk-legend .s-recent i { background: var(--muted); }
.chk-chip.s-covered { background: var(--success-soft); border-color: transparent; }
.chk-chip.s-missing { border-style: dashed; border-color: var(--danger-text); }
.chk-chip.opt { opacity: .85; }
.chk-chip.in { animation: chkIn .42s cubic-bezier(.2, .9, .3, 1.15) both; animation-delay: calc(var(--i, 0) * 28ms); }
.chk-chip.changed { animation: chkPop .5s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes chkIn { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes chkPop { 40% { transform: scale(1.05); } }
.chk-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; } .chk-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chk-gaps { display: grid; gap: 8px; }
.chk-gap { padding: 10px 12px; border-radius: 12px; background: var(--sunken); }
.chk-sug { gap: 8px; min-height: 44px; }
.chk-ai { margin-top: var(--s3); padding: 12px; border-radius: 12px; background: var(--info-soft); }
.chk-ai p { margin: 4px 0 0; } .chk-ai ul { margin: 6px 0 0; padding-left: 18px; }
.chk-ai svg { width: 14px; height: 14px; vertical-align: -2px; }
.chk-ai.busy { display: flex; align-items: center; gap: 8px; font-size: var(--fs-small); }
.chk-ai .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--text); animation: chkSpin .8s linear infinite; }
@keyframes chkSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .chk-chip.in, .chk-chip.changed { animation: none; } .chk-ring .val { transition: none; } }

/* v1.14 Spotify mini-player */
.sp-mini { position: relative; display: flex; align-items: center; gap: 12px; margin-top: var(--s3); padding: 10px 12px 12px; border-radius: 16px; background: var(--surface-2, var(--surface)); border: 1px solid var(--border); overflow: hidden; transition: background .35s, border-color .35s; }
.sp-mini.on { border-color: color-mix(in srgb, #1ed760 35%, var(--border)); }
.sp-mini.sp-off { padding: 10px 8px 10px 12px; }
.sp-logo, .sp-art.ph { width: 28px; height: 28px; flex: none; display: grid; place-items: center; }
.sp-logo svg { width: 28px; height: 28px; }
.sp-art { width: 48px; height: 48px; flex: none; border-radius: 8px; object-fit: cover; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); transition: transform .45s cubic-bezier(.2, .9, .3, 1.2), filter .35s; }
.sp-art.paused { transform: scale(.9); filter: saturate(.6); }
.sp-art.ph { width: 48px; height: 48px; border-radius: 8px; background: var(--sunken); }
.sp-meta { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; min-height: 44px; justify-content: center; }
.sp-t { max-width: 100%; font-weight: var(--fw-strong); font-size: var(--fs-small); }
.sp-a { max-width: 100%; color: var(--muted); font-size: .8rem; }
.sp-ctl { display: flex; align-items: center; gap: 2px; flex: none; }
.sp-b { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text); transition: transform .25s cubic-bezier(.2, .9, .3, 1.4), background .2s; }
.sp-b svg { width: 22px; height: 22px; }
.sp-b:active { transform: scale(.86); background: var(--sunken); }
.sp-pp { background: var(--text); color: var(--canvas, #111); }
.sp-pp:active { background: var(--text); }
.sp-bar { position: absolute; left: 12px; right: 12px; bottom: 5px; height: 3px; border-radius: 2px; background: var(--border); overflow: hidden; }
.sp-bar i { display: block; height: 100%; background: var(--text-2); border-radius: 2px; transition: width 1s linear; }
.sp-mini.on .sp-bar i { background: #1ed760; }
.sp-cta { background: #1ed760; color: #08130c; border-color: transparent; font-weight: var(--fw-strong); }
.sp-x { width: 36px; height: 36px; }
.sp-prem { max-width: 110px; text-align: right; }
@media (prefers-reduced-motion: reduce) { .sp-art, .sp-b, .sp-bar i { transition: none; } }

/* v1.19.1 Spotify player in the bottom session stack (with the rest countdown) */
#sp-dock[hidden] { display: none; }
#sp-dock .sp-mini { margin-top: 0; border-radius: var(--r-card); background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border-color: var(--border-strong); box-shadow: var(--e2); padding: 8px 8px 10px 10px; }
#sp-dock .sp-mini.sp-off { padding: 8px 6px 8px 12px; }
#sp-dock .sp-art, #sp-dock .sp-art.ph { width: 40px; height: 40px; }
#sp-dock .sp-bar { bottom: 4px; }
#sp-dock.sp-in { animation: spIn .5s cubic-bezier(.32, .72, 0, 1) both; }
@keyframes spIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
body.kb-open #sp-dock { display: none; }
#view { padding-bottom: calc(var(--tab-h) + var(--safe-b) + var(--badge-h) + max(132px, var(--dock-h, 0px) + 24px)); }
body.onboarding #view { padding-bottom: calc(var(--safe-b) + var(--badge-h) + var(--s5)); }
#resume-btn { bottom: calc(var(--tab-h) + var(--safe-b) + var(--badge-h) + max(78px, var(--dock-h, 0px) + 12px)); }
.theme-yazio #resume-btn { bottom: calc(var(--tab-h) + var(--safe-b) + var(--badge-h) + 18px + max(78px, var(--dock-h, 0px) + 12px)); }
@media (prefers-reduced-motion: reduce) { #sp-dock.sp-in { animation: spFade .15s ease both; } }
@keyframes spFade { from { opacity: 0; } }

/* v1.14 Détail par faisceau */
.hd-back svg { transform: rotate(180deg); }
.hd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hd-row { padding: 10px 12px; border-radius: 12px; background: var(--sunken); }
.hd-row.opt { opacity: .88; }
.hd-nm { display: inline-flex; align-items: center; gap: 8px; }
.hd-nm .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.hd-v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hd-bar { margin-top: 8px; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.hd-bar i { display: block; height: 100%; width: var(--w); border-radius: 3px; background: var(--success); transition: width .8s cubic-bezier(.2, .9, .25, 1.05); transition-delay: calc(var(--i, 0) * 25ms); }
.hd-bar i.from0 { width: 0; transition: none; }
.hd-row.s-light .hd-bar i { background: var(--warning); } .hd-row.s-recent .hd-bar i { background: var(--muted); }
.hd-row.s-missing { box-shadow: inset 0 0 0 1px var(--danger-text); }
.hd-pick { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.hd-row.in { animation: chkIn .45s cubic-bezier(.2, .9, .3, 1.15) both; animation-delay: calc(var(--i, 0) * 25ms); }
.hd-row.changed { animation: chkPop .5s cubic-bezier(.2, .9, .3, 1.3); }
.chk-sheet.nav-in > *:not(.grab) { animation: hdIn .38s cubic-bezier(.2, .9, .3, 1) both; }
.chk-sheet.nav-back > *:not(.grab) { animation: hdBack .38s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes hdIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes hdBack { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hd-row.in, .hd-row.changed, .chk-sheet.nav-in > *, .chk-sheet.nav-back > * { animation: none; } .hd-bar i { transition: none; } }
/* v1.16 own Gemini key sheet */
.own-key-steps { margin: 12px 0; padding-left: 1.3em; display: grid; gap: 6px; }
.own-key-steps a { color: var(--accent, #0a84ff); }
.own-key-warn { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, #ff9f0a 14%, transparent); border: 1px solid color-mix(in srgb, #ff9f0a 40%, transparent); line-height: 1.45; }

/* ---------- v1.17 invité : incitation au compte ---------- */
.sync-status.guest { color: var(--warning-text); background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 40%, transparent); cursor: pointer; font: inherit; font-size: var(--fs-label); font-weight: var(--fw-strong); }
.sync-status.guest svg { color: var(--warning-text); }
.guest-banner { position: relative; margin-top: var(--s3); border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); background: linear-gradient(150deg, color-mix(in srgb, var(--warning) 14%, var(--surface)) 0%, var(--surface) 70%); overflow: hidden; }
.guest-banner h2 { font-size: 1.05rem; margin: 0 0 4px; padding-right: 28px; }
.guest-banner p { margin: 0; color: var(--text); opacity: .86; }
.gb-top { display: flex; gap: var(--s3); align-items: flex-start; }
.gb-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--warning-soft); color: var(--warning-text); }
.gb-ic svg { width: 22px; height: 22px; }
.gb-perks { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--s3) 0; }
.gb-perks span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 8px; border-radius: var(--r-pill); background: var(--surface-2); font-size: var(--fs-label); font-weight: var(--fw-strong); }
.gb-perks svg { width: 14px; height: 14px; color: var(--accent); }
.guest-banner .btn-row .btn { flex: 1; }
.gb-x { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 50%; }
.gb-x svg { width: 18px; height: 18px; }
.guest-chip { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: var(--s3); min-height: 44px; padding: 0 12px; border-radius: var(--r-card); border: 1px solid color-mix(in srgb, var(--warning) 40%, var(--border)); background: var(--warning-soft); color: var(--warning-text); font: inherit; font-size: var(--fs-small); font-weight: var(--fw-strong); text-align: left; }
.guest-chip span { flex: 1; } .guest-chip svg { width: 18px; height: 18px; flex: none; }
.gate-hero { text-align: center; }
.gate-badge { width: 56px; height: 56px; margin: 4px auto 10px; border-radius: 18px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 22%, transparent); }
.gate-badge svg { width: 28px; height: 28px; }
.gate-card { text-align: left; } .gate-card .gate-badge { margin-left: 0; }
.gate-risk { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: var(--r-pill); background: var(--warning-soft); color: var(--warning-text); font-weight: var(--fw-strong); }
.gate-risk svg { width: 16px; height: 16px; }
.gate-list { list-style: none; padding: 0; margin: var(--s4) 0 var(--s3); display: grid; gap: 10px; }
.gate-list li { display: flex; gap: 12px; align-items: flex-start; text-align: left; }
.gate-list li > span:last-child { display: grid; gap: 2px; }
.gate-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.gate-ic svg { width: 18px; height: 18px; }
html.anim-full .guest-banner { animation: gb-in 600ms var(--ease) both; }
@keyframes gb-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- v1.17 swipe série → supprimer ---------- */
.set-row.sw { overflow: hidden; touch-action: pan-y; }
.set-row.sw > *:not(.swipe-bg) { transform: translate3d(var(--sx, 0), 0, 0); }
.set-row.sw.sw-anim > *:not(.swipe-bg) { transition: transform 380ms var(--spring); }
.set-row.sw-gone { opacity: 0; transition: opacity 240ms ease 60ms; }
.swipe-bg { position: absolute; top: 0; bottom: 0; z-index: -1; border: 0; margin: 0; padding: 0 16px; display: flex; align-items: center; gap: 6px; background: var(--danger); color: #fff; font: inherit; font-size: var(--fs-label); font-weight: var(--fw-strong); width: max(84px, var(--sw, 0px)); border-radius: var(--r-control); }
.set-row.sw-left .swipe-bg { right: 0; justify-content: flex-end; }
.set-row.sw-right .swipe-bg { left: 0; justify-content: flex-start; }
.swipe-bg svg { width: 18px; height: 18px; transition: transform 240ms var(--spring); }
.swipe-bg.arm svg { transform: scale(1.25); }
.set-row:not(.sw-left):not(.sw-right) .swipe-bg { opacity: 0; }
#toast.has-act { display: flex; align-items: center; gap: 14px; pointer-events: auto; padding-right: 8px; }
.toast-undo { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; min-height: 36px; padding: 0 10px; border-radius: 8px; }
/* v1.17.1 – swipe-to-delete respects reduced motion (no slide, short fade only) */
@media (prefers-reduced-motion: reduce) {
  .set-row.sw.sw-anim > *:not(.swipe-bg), .swipe-bg svg { transition: none; }
  .swipe-bg.arm svg { transform: none; }
  .set-row.sw-gone { transition: opacity 150ms linear; }
}

/* v1.18.0 tab badge */
#tabbar a .tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger, #e5484d); color: #fff; font-size: .6875rem; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; pointer-events: none; }

/* v1.20.0 Potes : séances d'un pote */
.pf-open { all: unset; display: flex; flex-direction: column; min-width: 0; min-height: 44px; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: 10px; }
.pf-open:focus-visible { outline: 2px solid var(--accent, #d4a640); outline-offset: 2px; }
.pf-open:active { opacity: .6; transition: opacity .12s; }
.pf-share { gap: 12px; margin-top: 12px; }
.pf-sheet .seg { margin: 8px 0 12px; }
.pf-ses, .pf-rt { margin-bottom: 10px; }
.pf-ses .meta { margin-top: 2px; }
.pf-ex { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.pf-ex li { display: flex; gap: 8px; font-size: 14px; min-width: 0; }
.num, .pf-vs { font-variant-numeric: tabular-nums; }
.pf-vs { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.pf-up { color: #34c759; } .pf-dn { color: #ff6b5e; }
.pf-body { animation: pfIn .32s cubic-bezier(0.32, 0.72, 0, 1) both; }
@keyframes pfIn { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .pf-body { animation: none; } }

/* v1.24.0 Connecter une IA (MCP) */
.auth.mcp { max-width: 640px; }
.mcp .card { margin-bottom: var(--s4); }
.mcp-form .field { margin-bottom: var(--s3); }
.mcp-w { gap: 12px; padding-left: 0; padding-right: 0; }
.mcp-snip { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; min-width: 0; }
.mcp-snip pre { flex: 1; min-width: 0; margin: 0; padding: 10px 12px; background: var(--sunken); border: 1px solid var(--border); border-radius: var(--r-control); font: 500 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all; -webkit-user-select: all; user-select: all; }
.mcp-snip .btn { flex: none; gap: 6px; }
.mcp-snip .btn svg { width: 16px; height: 16px; }
.mcp-tabs { margin: 8px 0 12px; overflow-x: auto; }
.mcp-tabs button { white-space: nowrap; padding: 0 8px; }
.mcp-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 10px; font-size: var(--fs-small); }
.mcp code, .mcp-steps code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--sunken); padding: 1px 5px; border-radius: 5px; }
.mcp-fresh h2 { display: flex; gap: 8px; align-items: center; }
.mcp-fresh h2 svg { width: 20px; height: 20px; color: var(--success); }
.mcp-fresh .notice { margin: 8px 0; }
.mcp-row { gap: 10px; flex-wrap: wrap; }
.mcp-tools ul { margin: 6px 0 10px; padding-left: 1.2em; font-size: var(--fs-small); display: grid; gap: 4px; }
.mcp details summary, details.mcp-tools summary, details.mcp-how summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.mcp-load { padding: var(--s3) 0; }

/* v1.25.0 Connecter Yazio */
.yz-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: var(--fw-strong); letter-spacing: .02em; background: color-mix(in srgb, var(--action) 14%, transparent); color: var(--action); }
.yz-day h3 { margin: 0; font-size: var(--fs-small); }
.yz-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); margin: var(--s3) 0 var(--s2); }
.yz-k { display: flex; flex-direction: column; min-width: 0; }
.yz-k .l { font-size: 11px; color: var(--muted); }
.yz-k .v { font-weight: var(--fw-strong); font-size: 17px; color: var(--text); white-space: nowrap; }
.yz-k .v small { font-size: 11px; font-weight: 400; color: var(--text-2); }
.yz-k .g { font-size: 11px; color: var(--muted); }
.yz-card .row { gap: var(--s3); align-items: center; }
.yz-logo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--action) 14%, transparent); color: var(--action); flex: none; }
.yz-logo svg { width: 20px; height: 20px; }
.yz-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); margin: var(--s3) 0; padding: var(--s3) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.yz-stats div { display: flex; flex-direction: column; min-width: 0; }
.yz-stats b { font-size: 15px; color: var(--text); overflow-wrap: anywhere; }
.yz-stats span { font-size: 11px; color: var(--muted); }
.yz-w { margin-top: var(--s3); padding-left: 0; padding-right: 0; gap: 10px; }
.yz-note { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
@media (max-width: 360px) { .yz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* v1.27 Créer depuis mon objectif */
.goal-entry { width: 100%; text-align: left; font: inherit; color: inherit; border: 0; }
.goal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.goal-text { resize: vertical; min-height: 76px; }
.goal-rt { padding: 12px; }
.goal-rt.off { opacity: .55; }
.goal-rt-name { flex: 1; margin-right: 8px; font-weight: 600; }
.goal-ex { list-style: none; margin: 8px 0 0; padding: 0; }
.goal-ex li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line, rgba(127,127,127,.18)); }
/* v1.27.4 : macros du jour sur la séance en cours */
.fuel-chip { display: flex; align-items: center; gap: var(--s2) var(--s3); flex-wrap: wrap; margin: calc(-1 * var(--s2)) 2px var(--s4); padding: 8px 12px; border-radius: 14px; background: color-mix(in srgb, var(--action) 7%, transparent); border: 1px solid color-mix(in srgb, var(--action) 18%, transparent); color: var(--text); text-decoration: none; font-size: var(--fs-small); -webkit-tap-highlight-color: transparent; }
.fuel-chip:active { transform: scale(.985); }
.fuel-chip .fc-d { color: var(--muted); font-weight: var(--fw-strong); }
.fuel-chip .fc-k { font-family: var(--font-num); font-weight: 700; font-variant-numeric: tabular-nums; }
.fuel-chip .fc-k small { color: var(--muted); font-weight: 500; }
.fuel-chip .fc-ms { display: inline-flex; gap: 10px; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.fuel-chip .fc-m i { font-style: normal; color: var(--muted); margin-right: 3px; font-size: .85em; }
.fuel-chip .yz-badge { margin-left: auto; }
.fuel-chip.home { margin: 0 0 var(--s3); }

/* v1.27.7 BYO home */
.byo-home { position: relative; margin: 0 0 var(--s3); border-radius: 14px; background: color-mix(in srgb, var(--accent, var(--action)) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent, var(--action)) 24%, transparent); }
.byo-home .byo-main { display: flex; align-items: center; gap: var(--s3); width: 100%; padding: 10px 40px 10px 12px; background: none; border: 0; color: var(--text); text-align: left; font: inherit; -webkit-tap-highlight-color: transparent; }
.byo-home .byo-main:active { transform: scale(.985); }
.byo-home .t { display: block; font-weight: var(--fw-strong); }
.byo-home .s { display: block; font-size: var(--fs-small); color: var(--text-2); }
.byo-home .byo-x { position: absolute; top: 2px; right: 2px; width: 36px; height: 36px; background: none; border: 0; color: var(--muted); font-size: 20px; }

/* v1.28 — Volume par muscle (4 vs 8 sem.) */
.vol-seg { margin-bottom: 0; }
.vol-tick { position: absolute; top: -1px; bottom: -1px; width: 2px; margin-left: -1px; background: var(--text); border-radius: 1px; opacity: .55; }
.vol-legend-tick { display: inline-block; width: 2px; height: 10px; background: var(--text); opacity: .55; vertical-align: -1px; border-radius: 1px; }
.vol-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); }
.vol-d { font-weight: var(--fw-strong); color: var(--text-2); }
.vol-d.up { color: var(--success); } .vol-d.down { color: var(--warning-text); }
.vol-spark { display: inline-flex; align-items: flex-end; gap: 3px; height: 26px; flex: none; }
.vol-wk { width: 6px; border-radius: 2px; background: var(--surface-2); transform-origin: bottom; animation: volgrow .5s cubic-bezier(.2,.8,.2,1) both; }
.vol-wk.ok { background: var(--success); opacity: .55; } .vol-wk.warn { background: var(--warning-text); opacity: .55; } .vol-wk.high { background: var(--danger-text); opacity: .55; } .vol-wk.none { background: var(--border); }
.vol-wk.cur { opacity: 1; }
.vol-fill { transition: width .4s ease; }
@keyframes volgrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .vol-wk { animation: none; } .vol-fill { transition: none; } }
/* v1.28.1 échec → charge */
.fail-hint .ar-btn.ok { font-weight: 700; }
.fail-hint .tiny { line-height: 1.35; }
/* v1.28.3 connexion IA simplifiée */
.mcp-quick { display: grid; gap: 8px; margin: 12px 0; }
.mcp-quick .btn { min-height: 48px; gap: 8px; }
.mcp-quick .btn svg { width: 18px; height: 18px; }
.mcp-qr { text-align: center; margin: 8px 0 12px; }
.mcp-qr-svg { width: min(240px, 70vw); height: auto; border-radius: 12px; border: 1px solid var(--border); }
.mcp-raw summary { cursor: pointer; padding: 6px 0; }

/* v1.28.4 Ma salle */
.gym-chip { display: flex; align-items: center; gap: 8px; width: 100%; margin: var(--s2) 0 0; padding: 8px 12px; min-height: 44px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--action-soft); color: var(--text); font: 500 .85rem var(--font-body); text-align: left; }
.gym-chip svg { width: 16px; height: 16px; flex: none; }
.gym-chip .grow { display: flex; flex-direction: column; min-width: 0; }
.gym-chip b small { font-weight: 500; color: var(--muted); }
.gym-chip .gym-set { overflow-wrap: anywhere; }
.gym-chip.add { background: transparent; border-style: dashed; color: var(--muted); font-weight: 600; font-size: .8rem; min-height: 36px; border-radius: 999px; width: auto; }
.ex-goal-chip { display: inline-flex; align-items: center; gap: 6px; margin: var(--s2) 0 0; padding: 0 12px; min-height: 44px; border-radius: 999px; border: 1px solid var(--action, var(--border-strong)); background: var(--action-soft); color: var(--text); font: 600 .8rem var(--font-body); text-align: left; }
.ex-goal-chip svg { width: 16px; height: 16px; flex: none; }
.ex-goal-chip.auto { border-style: dashed; border-color: var(--border-strong); background: transparent; color: var(--muted); }
.r-item .ex-goal-chip { min-height: 36px; margin-top: 6px; }

.gym-list { list-style: none; padding: 0; margin: var(--s3, 12px) 0 0; display: grid; gap: 10px; }
.gym-st { padding: 12px; }
.gym-st-head { gap: 8px; align-items: center; }
.gym-num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--action-soft); font-weight: 700; font-variant-numeric: tabular-nums; }
.gym-name { flex: 1; min-width: 0; font-weight: 600; }
.gym-move { display: flex; gap: 4px; flex: none; }
.gym-move .mini-btn { min-width: 36px; min-height: 36px; }
.gym-st .input { font-size: 16px; }
.gym-exs { padding: 4px 0 8px; }
.gym-exs .chip { display: inline-flex; align-items: center; gap: 4px; }
.gym-exs .chip svg { width: 16px; height: 16px; }


/* v1.28.5 Corriger une séance passée + libellé lest */
.lest-hint { margin: 6px 2px 4px; }
button.set-line.tap { width: 100%; margin: 0; border: 0; border-top: 1px solid var(--border); background: transparent; color: inherit; font: inherit; text-align: left; min-height: 44px; padding: var(--s2) 2px; border-radius: var(--r-control); cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.set-line.tap:first-of-type { border-top: 0; }
button.set-line.tap:active { background: var(--surface-2); }
button.set-line.tap .chev { width: 16px; height: 16px; flex: none; opacity: .45; }
.card.hist-ex { padding-bottom: 12px; }
.fix-form .input { font-size: 16px; }
.fix-head, .fix-row { display: grid; grid-template-columns: 36px 1fr 1fr; gap: 8px; align-items: center; }
.fix-head { padding: 0 2px 6px; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--muted); }
.fix-head.has-rir, .fix-form.has-rir .fix-row { grid-template-columns: 36px 1fr 1fr 72px; }
.fix-head.now, .fix-form.now .fix-row { grid-template-columns: 36px 1fr; }
.fix-head.now.has-rir, .fix-form.now.has-rir .fix-row { grid-template-columns: 36px 1fr 72px; }
.fix-row { margin: 0 0 8px; }
.fix-row .n { width: 28px; height: 28px; border-radius: 6px; background: var(--surface-2); display: grid; place-content: center; font-family: var(--font-num); font-weight: 700; font-size: .875rem; color: var(--text-2); }
.fix-row .n.k-w { color: var(--muted); } .fix-row .n.k-d { color: var(--warning-text); }
.fix-f { margin: 0; min-width: 0; }
.fix-f .input { width: 100%; min-height: 44px; text-align: center; font-family: var(--font-num); font-weight: 600; }

button.gh-t, button.gh-vs { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; min-height: 44px; padding: 8px 0; }
button.gh-vs { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 10px; }
/* v1.40.5 : fantôme lisible (verdict · 80 × 10 → 75 × 12 · +12,5 % de volume) */
.gh-vs .gh-main { min-width: 0; line-height: 1.3; }
.gh-vs .gh-main b { font-weight: 700; }
.gh-vs .gh-cmp { font-variant-numeric: tabular-nums; white-space: nowrap; }
.gh-vs .gh-sub { display: block; font-size: 12px; font-weight: 500; opacity: .85; }
.ex-hist-sheet.tall { max-height: 92vh; }
.ex-hist-sheet .chart-wrap.mini { margin: 8px 0 4px; }
.ex-hist-sheet .chart-wrap.mini svg { width: 100%; height: auto; max-height: 132px; }
.ex-hist-sheet .pr-grid { margin-bottom: 12px; }
.ex-hist-sheet .hist-ex { margin-top: 10px; }
.ex-hist-sheet .set-line.tap .pr-pill { position: static; margin-left: 6px; }

.order-hint { display: flex; align-items: flex-start; gap: 8px; margin: var(--s3) 0 0; padding: 8px 12px; border-radius: 12px; background: var(--card, transparent); }
.order-hint svg { width: 16px; height: 16px; flex: none; margin-top: 1px; opacity: .7; }

.vol-prog-hint { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 0; color: var(--muted); }
.vol-prog-hint svg { width: 16px; height: 16px; flex: none; margin-top: 1px; opacity: .7; }
.vol-hint { margin: 0 0 8px; }

/* v1.35 bloc force */
.pl-lift { border: 1px solid var(--border); border-radius: var(--r-card); margin: 0 0 var(--s3); overflow: hidden; }
.pl-lift-h { margin: 0; }
.pl-lift-b { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s3); padding: 0 12px 10px; }
.pl-lift:not(.on) { opacity: .7; }
.pl-lifts { list-style: none; padding: 0; margin: 0; }
.pl-row { display: flex; align-items: center; gap: var(--s3); padding: 12px 0; border-bottom: 1px solid var(--border); }
.pl-spark { color: var(--action); flex: 0 0 auto; }
.set-num.pl-role { flex-direction: column; gap: 1px; line-height: 1.05; }
.set-num .pl-set { display: block; font-size: 9px; font-weight: var(--fw-strong); color: var(--text-2); max-width: 46px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-card .next-ico { background: var(--action-soft); color: var(--action-text); }
.pl-sheet .pl-lift { background: var(--surface); }
.pl-sheet .actions { position: sticky; bottom: 0; z-index: 2; background: var(--sheet-bg); margin-top: var(--s4); padding: 8px 0 4px; box-shadow: 0 -12px 16px -8px var(--sheet-bg); }

/* v1.36.0 — page de consentement OAuth (api/oauth/authorize) */
.oauth-page { min-height: 100dvh; background: var(--canvas); color: var(--text); }
.oauth-page .oauth-main { max-width: 28rem; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top)) 16px 32px; }
.oauth-brand { font-family: "Barlow Condensed", Barlow, sans-serif; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--action-text); margin: 0 0 16px; }
.oauth-scopes { margin: 0 0 16px; padding-left: 1.1rem; }
.oauth-scopes li { margin: 0 0 8px; }
.oauth-page .oauth-write { margin: 0 0 16px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.oauth-page #oauth-grant .btn + .btn,
.oauth-page #oauth-login .btn { margin-top: 8px; }

/* v1.36.1 séance oubliée + palier machine */
.forgot-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin: var(--s3) 0; }
.forgot-cmp .fc { display: flex; flex-direction: column; gap: 2px; padding: var(--s3); border-radius: var(--r-control); border: 1px solid var(--border); background: var(--surface-2, transparent); }
.forgot-cmp .fc.on { border-color: var(--action); background: var(--action-soft); }
.forgot-cmp .fc b { font-size: 1.25rem; }
.active-card.stale { border-color: var(--warning); }
.active-card.stale .ac-ic { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--warning-soft); color: var(--warning-text); margin-right: var(--s3); }
.active-card.stale .ac-ic svg { width: 22px; height: 22px; }
.active-card.stale .btn-row { flex-wrap: wrap; }
.forgot-notice { align-items: center; }
.forgot-notice svg { width: 18px; height: 18px; flex: none; }
.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.st-grid .field { margin-top: var(--s3); }
.st-dur { display: flex; gap: var(--s3); margin-top: 6px; }
.st-dur label { display: flex; align-items: center; gap: 6px; }
.st-dur .input { width: 5.5rem; text-align: center; }
.conseq-global { display: flex; gap: var(--s2); align-items: flex-start; margin: 0 0 var(--s2); }
.conseq-global svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.palier-chip { display: inline-flex; align-items: center; gap: 6px; margin: var(--s2) 6px 0 0; padding: 0 12px; min-height: 44px; border-radius: 999px; border: 1px solid var(--action, var(--border-strong)); background: var(--action-soft); color: var(--text); font: 600 .8rem var(--font-body); }
.palier-chip svg { width: 16px; height: 16px; flex: none; }
.palier-chip.auto { border-style: dashed; border-color: var(--border-strong); background: transparent; color: var(--muted); }
.inc-chips { flex-wrap: wrap; overflow: visible; padding-bottom: 0; margin: 6px 0 0; max-width: 100%; }
.inc-chips .chip { min-height: 40px; flex: none; }
.gym-st, .gym-st .field { min-width: 0; }
.inc-custom { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); }
.inc-custom[hidden] { display: none; }
.inc-custom .input { width: 6.5rem; text-align: center; }
.stepper .v.inc-pick { background: none; border: 0; color: inherit; font: inherit; font-weight: var(--fw-strong); text-decoration: underline dotted; text-underline-offset: 3px; min-height: 44px; padding: 0 6px; cursor: pointer; }

/* ---------- v1.37.0 : mode Focus séance (onglets masqués, une barre d’action dans la zone du pouce) ---------- */
body.focus { --tab-h: 0px; }
body.focus #tabbar { display: none; }
body.focus #dock { bottom: calc(var(--safe-b) + var(--badge-h)); padding-bottom: var(--s2); }
.theme-yazio body.focus #dock { bottom: calc(var(--safe-b) + var(--badge-h) + 6px); }
body.focus #undo-bar { bottom: calc(var(--safe-b) + var(--badge-h) + var(--dock-h, 0px) + 12px); }
#focus-bar[hidden] { display: none; }
#focus-bar { display: flex; gap: var(--s2); align-items: stretch; }
.fb-go { flex: 1; min-width: 0; min-height: 64px; border-radius: var(--r-card); background: var(--action); border: 1px solid var(--action); color: var(--on-action); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 8px 16px; box-shadow: var(--e2); text-align: left; transition: transform var(--dur-fast) var(--ease), background-color var(--dur-base) var(--ease); }
.fb-go:active { transform: scale(.98); }
.fb-go .fb-l { font-size: var(--fs-label); font-weight: var(--fw-strong); opacity: .88; max-width: 100%; }
.fb-go .fb-v { display: flex; align-items: center; gap: 8px; font-family: var(--font-num); font-size: 1.5rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fb-go .fb-ck { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--on-action) 16%, transparent); }
.fb-go .fb-ck svg { width: 18px; height: 18px; }
.fb-go.fin { background: var(--success); border-color: var(--success); color: var(--on-success); }
.fb-go.add { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.fb-go.add .fb-v, .fb-go.fin .fb-v { font-family: var(--font-body); font-size: 1.125rem; }
.fb-music { flex: none; width: 56px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); display: grid; place-items: center; box-shadow: var(--e2); }
.fb-music svg, #restbar .rt-music svg { width: 22px; height: 22px; }
.fb-music.on, #restbar .rt-music.on { color: #1ed760; }
.fb-music.open { border-color: var(--action); }
#restbar .rt-music { display: none; }
body.focus.has-music #restbar .rt-music { display: grid; place-items: center; min-width: 44px; padding: 0; }
body.focus #sp-dock { display: none; }
body.focus.sp-open #sp-dock:not([hidden]) { display: block; order: -1; }
body.kb-open #focus-bar { display: none; }
body.focus .wk-title { min-height: var(--target); }
body.focus .ar-btn { min-height: var(--target); }
body.focus .stepper.sm button { min-width: var(--target); min-height: var(--target); }
.wk-ctx { margin: 0 0 var(--s3); }
.wk-ctx > * { margin-top: 0; margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .fb-go, .fb-go:active { transition: none; transform: none; } }
body.focus .sets-head, body.focus .set-row { grid-template-columns: 44px minmax(0, 1fr) 68px 60px 48px; }
body.focus .wk-title { min-width: var(--target); }

/* ---------- v1.37.1 : carte d’exercice épurée (Coach à la demande, ressenti en un geste, échauffement groupé) ---------- */
.ex-tools { display: flex; gap: var(--s2); align-items: center; margin: var(--s2) 0 var(--s3); min-width: 0; }
.coach-pill { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: var(--target); padding: 0 12px 0 10px; border-radius: var(--r-pill, 999px); background: var(--action-soft, color-mix(in srgb, var(--action) 14%, var(--surface))); color: var(--action-text); font-weight: var(--fw-strong); font-size: var(--fs-small); border: 1px solid color-mix(in srgb, var(--action) 40%, transparent); }
.coach-pill svg { width: 16px; height: 16px; flex: none; }
.coach-pill .rx-tag { margin: 0; }
.coach-pill .cp-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--action); box-shadow: 0 0 0 2px var(--surface); }
.ex-set-line { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 6px; min-height: var(--target); padding: 0 8px; border-radius: var(--r-control); color: var(--muted); font-size: var(--fs-label); font-weight: var(--fw-strong); text-align: left; }
.ex-set-line svg { width: 16px; height: 16px; flex: none; }
.ex-set-line .ellipsis { min-width: 0; }
.ex-set-chips { display: flex; flex-wrap: wrap; gap: 0 6px; margin: var(--s2) 0; }
.ex-settings-sheet .ex-rest { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin: var(--s2) 0; }
.ex-settings-sheet .ex-rest .tiny { font-size: var(--fs-small); color: var(--text); font-weight: var(--fw-strong); }
.ex-settings-sheet .stepper.sm button { min-width: var(--target); min-height: var(--target); }
.coach-sheet .rx-strip { margin-top: var(--s3); }
.coach-sheet .vol-hint { margin-top: var(--s3); display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; align-items: start; gap: 10px 8px; padding: 12px; }
.coach-sheet .vol-hint .grow { grid-column: 2 / -1; line-height: 1.4; }
.coach-sheet .vol-hint .ar-btn { grid-row: 2; }
.coach-sheet .vol-hint .ar-btn:first-of-type { grid-column: 3; }
.coach-sheet .vol-hint .ar-btn.ok { grid-column: 4; }
.coach-sheet .ar-btn { min-height: var(--target); }
.feel-row { display: flex; flex-direction: column; gap: 6px; padding: 6px 2px 10px 50px; }
.feel-l { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--fs-label); color: var(--muted); font-weight: var(--fw-strong); }
.feel-help { min-height: var(--target); min-width: var(--target); padding: 0 6px; color: var(--action-text); font-weight: var(--fw-strong); font-size: var(--fs-label); }
.feel-chips { display: flex; gap: 6px; }
.feel { flex: 1; min-height: 52px; min-width: 0; border-radius: var(--r-control); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 2px; -webkit-touch-callout: none; user-select: none; touch-action: manipulation; }
.feel b { font-size: var(--fs-small); }
.feel small { font-size: .6875rem; color: var(--muted); white-space: nowrap; }
.feel.more { flex: 0 0 48px; font-family: var(--font-num); font-weight: 700; color: var(--text-2); }
.feel.on { background: var(--action); border-color: var(--action); color: var(--on-action); }
.feel.on small { color: inherit; opacity: .85; }
.feel:active { transform: scale(.97); }
.set-flags.mini { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 2px 0 8px 50px; }
.sf-tag { font-size: var(--fs-label); font-weight: var(--fw-strong); padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--warning) 18%, var(--surface)); color: var(--text); }
.set-flags.mini .set-fb { flex-basis: 100%; margin: 0; }
.warm-row { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 6px; align-items: center; padding: 3px 2px; border-radius: var(--r-control); }
.warm-row.done { background: var(--success-soft); }
.warm-sum { display: flex; align-items: center; gap: 10px; min-height: var(--target); text-align: left; min-width: 0; }
.warm-sum .set-num { width: 44px; display: grid; place-items: center; flex: none; border: 1px dashed var(--border-strong); }
.warm-sum .grow { display: flex; flex-direction: column; min-width: 0; }
.warm-sum b { font-size: var(--fs-small); }
.warm-sum small { font-size: var(--fs-label); color: var(--muted); font-family: var(--font-num); }
.warm-sum .chev { transform: rotate(90deg); }
.warm-row.done .set-check { background: var(--success); border-color: var(--success); color: var(--on-success); }
.ex-folded { padding: 0; }
.ex-fold { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 14px; text-align: left; }
.ex-fold .grow { display: flex; flex-direction: column; min-width: 0; }
.ex-fold b { font-weight: var(--fw-strong); }
.ex-fold small { color: var(--muted); font-size: var(--fs-label); }
.fold-ck { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--success); color: var(--on-success); flex: none; }
.fold-ck svg { width: 16px; height: 16px; }
.rir-done button { min-height: var(--target); }
body.focus .rc-open { min-height: var(--target); }
@media (prefers-reduced-motion: reduce) { .feel:active { transform: none; } }


/* ---------- v1.40.6 : appui long puis glisser les cartes d’exercice en séance ---------- */
.ex-list .group-tag { position: relative; }
.ex-list .group-tag::before { content: ""; position: absolute; inset: -10px 0; }
.ex-list .ex-head, .ex-list .ex-name, .ex-list .ex-fold, .ex-list .group-tag { -webkit-touch-callout: none; }
.ex-card.ex-dragging {
  position: relative; z-index: 20; box-shadow: var(--e2); opacity: .98;
  transition: none; touch-action: none; will-change: transform;
}
body.ex-reordering { user-select: none; -webkit-user-select: none; cursor: grabbing; }
body.ex-reordering .ex-list { touch-action: none; }
@media (prefers-reduced-motion: reduce) {
  .ex-card.ex-dragging { box-shadow: var(--e2); }
}
/* ---------- v1.37.2 : une seule feuille de fin de séance ---------- */
.fin-sheet .sheet-title { margin-bottom: 2px; }
.fin-kpis .value { font-size: 1.25rem; }
.fin-undone { margin: var(--s3) 0 0; padding: 8px 12px; border-radius: var(--r-control); background: color-mix(in srgb, var(--warning) 14%, var(--surface)); }
.fin-routine { margin-top: var(--s3); border: 1px solid var(--border); border-radius: var(--r-card); padding: 4px 12px 8px; background: var(--surface); }
.fin-routine .fin-switch { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; border: 0; background: none; }
.fin-routine .fin-switch .grow { display: flex; flex-direction: column; min-width: 0; }
.fin-routine .fin-switch small { font-size: var(--fs-label); }
.fin-routine .rd-list { margin: 4px 0 8px; }
.fin-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border-radius: var(--r-control); background: var(--surface-2); margin: 4px 0 6px; }
.fin-mode .seg { min-height: var(--target); border-radius: calc(var(--r-control) - 3px); font-weight: var(--fw-strong); font-size: var(--fs-small); color: var(--text-2); padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-mode .seg.on { background: var(--surface); color: var(--text); box-shadow: var(--e1); }
.fin-routine .rd-never { display: flex; align-items: center; gap: 8px; min-height: var(--target); color: var(--muted); }
.fin-routine .rd-never input { width: 20px; height: 20px; }
.conseq-more { margin-top: 4px; }
.conseq-more summary { min-height: var(--target); display: flex; align-items: center; color: var(--action-text); font-weight: var(--fw-strong); font-size: var(--fs-small); cursor: pointer; }
.sum-sheet .btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }

/* ---------- v1.38.0 : 4 onglets + avatar (Profil et réglages), Progrès | Historique ---------- */
.avatar-btn { width: var(--target); height: var(--target); border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: var(--action-soft, color-mix(in srgb, var(--action) 18%, var(--surface))); color: var(--action-text); font-weight: 800; font-size: 1.05rem; border: 1px solid color-mix(in srgb, var(--action) 35%, transparent); text-decoration: none; }
.avatar-btn svg { width: 22px; height: 22px; }
.avatar-btn:active { transform: scale(.96); }
.sec-switch { margin: 0 0 var(--s3); }
#tabbar a { max-width: none; }
@media (prefers-reduced-motion: reduce) { .avatar-btn:active { transform: none; } }
.to-know { margin-top: var(--s4); }
.to-know > .group-label { margin-top: 0; }
.tk-more { margin-top: var(--s2); }
.tk-more > summary { min-height: var(--target); display: flex; align-items: center; color: var(--action-text); font-weight: var(--fw-strong); font-size: var(--fs-small); cursor: pointer; list-style: none; }
.tk-more > summary::-webkit-details-marker { display: none; }
.tk-more[open] > summary { margin-bottom: var(--s2); }
.home-more .btn { min-height: var(--target); }

/* ---------- v1.39.0 : Réglages en rubriques + recherche ---------- */
.set-hub { margin-bottom: var(--s3); }
.set-search { margin-bottom: var(--s3); }
.set-cats .list-item { min-height: 60px; }
.set-cats .t { display: block; font-weight: var(--fw-strong); }
.set-cats .s { display: block; font-size: var(--fs-label); color: var(--muted); }
.set-all { margin-top: var(--s3); min-height: var(--target); }
.set-sec[hidden], .set-hit-off { display: none !important; }
.set-adv { margin-top: var(--s4); }
.set-adv > summary { min-height: var(--target); display: flex; align-items: center; font-weight: var(--fw-strong); color: var(--action-text); cursor: pointer; }
.set-search .input { width: 100%; padding-left: 42px !important; min-height: var(--target); }
.set-more { margin-top: var(--s3); } .set-more .btn { min-height: var(--target); }
.set-gloss { margin-bottom: var(--s3); min-height: var(--target); }
.gloss { margin: var(--s3) 0 0; display: grid; gap: 10px; }
.gloss dt { font-weight: var(--fw-strong); }
.gloss dd { margin: 2px 0 0; color: var(--text-2); font-size: var(--fs-small); line-height: 1.45; }

/* v1.40.0 — éditeur de routine compact */
.r-item.re { padding: var(--s2) var(--s3) var(--s2) var(--s2); margin-top: var(--s2); }
.re-top { display: flex; align-items: center; gap: var(--s2); }
.re-top .avatar { width: 36px; height: 36px; flex: none; }
.re-main { min-width: 0; }
.re-name { line-height: 1.25; overflow-wrap: anywhere; }
.re-main .ex-goal-chip { margin-top: 4px; }
.re-more { flex: none; }
.re-bot { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); }
.re-bot .stepper .v { min-width: 32px; }
.re-x { font-size: var(--fs-small); color: var(--text-2); font-weight: var(--fw-strong); }
.re-reps { display: flex; align-items: center; gap: 6px; }
.r-item.re .reps { width: 64px; }
.re-link.r-link { width: var(--target); margin: 0 0 0 auto; padding: 0; flex: none; }
.re-sec { margin-top: var(--s3); }
.re-presets { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.re-fine { gap: var(--s2); margin-top: var(--s2); }
.re-actions { margin-top: var(--s4); display: grid; gap: var(--s2); }
.re-actions button[disabled] { opacity: .4; }
.re-folder summary { min-height: var(--target); display: flex; align-items: center; font-weight: var(--fw-strong); color: var(--text-2); cursor: pointer; }
.re-sheet .stepper.sm button { min-width: var(--target); min-height: var(--target); }
.re-top .rt-grip { width: var(--target); min-width: var(--target); }
.re-bot .stepper button { width: var(--target); height: var(--target); }
/* v1.40.1 — Coach : badge « + volume » lisible (remplace le point) */
.coach-pill .cp-badge { margin-left: 2px; padding: 2px 7px; border-radius: 999px; background: var(--action); color: var(--on-action); font-size: 11px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.set-adv > summary .grow { display: flex; flex-direction: column; padding: 8px 0; }
.set-adv > summary .s { font-size: var(--fs-small); font-weight: 400; color: var(--text-2); }
/* v1.40.2 — cibles de 44 px partout (segments, recherche Historique, fermer le bandeau, « Comment sont calculés ») */
.seg button { min-height: var(--target); }
.gb-x { width: var(--target); height: var(--target); top: 4px; right: 4px; }
.hist-search .input { min-height: var(--target); }
.rk-how > summary { min-height: var(--target); display: flex; align-items: center; cursor: pointer; }
.seg a, .lib-seg a { min-height: var(--target); }
/* v1.40.3 — ± palier dans la barre d’action (sans clavier) */
.fb-step { flex: none; width: 48px; min-height: 64px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); font-size: 1.6rem; font-weight: 700; display: grid; place-items: center; box-shadow: var(--e2); }
.fb-step:active { transform: scale(.96); }
html.anim-none .fb-step:active { transform: none; }
