/* ===============================================================
   TigerReps styles. Tokens first; everything below uses them.
   Light is "Current, refined" (cream and tiger orange); dark is "Bengal night".
   Light is the default; dark follows the phone unless You → Theme
   says otherwise.
=============================================================== */

:root {
  --bg: #f6ead9;              /* a shade deeper than the art, so white cards stand out */
  --surface: #ffffff;
  --surface-2: #f8efe2;
  --surface-hi: #f1e4d0;
  --line: #dcc8a8;
  --line-strong: #cdb896;
  --text: #2a2018;
  --muted: #6c5c46;
  --faint: #76654b;
  --hot: #d06c0c;             /* deep enough to mark a selection on cream (3:1) */
  --hot-ink: #a24812;
  --on-hot: #2a1c0c;
  --hot-soft: #fbe4c9;
  --ok: #3f9e6b;
  --ok-ink: #2a744c;     /* green as text: 4.5:1 on every light surface */
  --on-ok: #0f2a1d;
  --ok-soft: #ddefe4;
  --warm: #e0a94b;
  --danger: #b3402a;
  --art: #fcf4e9;
  --scrim: rgba(40, 24, 8, .45);
  --shadow: 0 12px 32px -14px rgba(60, 35, 10, .45);
  --radius: 14px;
  --nav-h: 62px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-num: "Avenir Next Condensed", "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", ui-sans-serif, system-ui, sans-serif;
  --ts: 1;                    /* text size: 1, 1.12 (large) or 1.25 (larger) */
  --fs-sm: calc(13.5px * var(--ts));
  --fs-md: calc(15px * var(--ts));
  --fs-lg: calc(17px * var(--ts));
  --fs-xl: calc(21px * var(--ts));
  --fs-2xl: calc(30px * var(--ts));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111111;
    --surface: #1d1d1d;
    --surface-2: #232323;
    --surface-hi: #2b2b2b;
    --line: #333333;
    --line-strong: #4a4a4a;
    --text: #f4f4f4;
    --muted: #a8a8a8;
    --faint: #8f8f8f;
    --hot: #ff7a1a;
    --hot-ink: #ffa463;
    --on-hot: #1a0d00;
    --hot-soft: #33200f;
    --ok: #4cc38a;
    --ok-ink: #4cc38a;
    --on-ok: #0a1f15;
    --ok-soft: #13281d;
    --warm: #e6a640;
    --danger: #ff8a70;
    --scrim: rgba(0, 0, 0, .66);
    --shadow: 0 12px 32px -14px rgba(0, 0, 0, .85);
    color-scheme: dark;
  }
}
:root[data-text="large"] { --ts: 1.12; }
:root[data-text="larger"] { --ts: 1.25; }
:root[data-theme="dark"] {
  --bg: #111111;
  --surface: #1d1d1d;
  --surface-2: #232323;
  --surface-hi: #2b2b2b;
  --line: #333333;
  --line-strong: #4a4a4a;
  --text: #f4f4f4;
  --muted: #a8a8a8;
  --faint: #8f8f8f;
  --hot: #ff7a1a;
  --hot-ink: #ffa463;
  --on-hot: #1a0d00;
  --hot-soft: #33200f;
  --ok: #4cc38a;
  --ok-ink: #4cc38a;
  --on-ok: #0a1f15;
  --ok-soft: #13281d;
  --warm: #e6a640;
  --danger: #ff8a70;
  --scrim: rgba(0, 0, 0, .66);
  --shadow: 0 12px 32px -14px rgba(0, 0, 0, .85);
  color-scheme: dark;
}

/* ---------- base ---------- */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.45;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px);
}
body.resting { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 100px); }
body.has-overlay { overflow: hidden; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
:focus-visible { outline: 2px solid var(--hot-ink); outline-offset: 2px; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.hint { margin: 8px 0 0; font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
.center { text-align: center; justify-content: center; }
.grow { flex: 1; }
mark { background: var(--hot-soft); color: inherit; border-radius: 3px; padding: 0 1px; }

.app { max-width: 620px; margin: 0 auto; }

/* ---------- icons ---------- */

.ico { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto; }
.ico svg { width: 100%; height: 100%; display: block; }
.ico.sm { width: 16px; height: 16px; }
.ico.muted { color: var(--faint); }
.ico.accent { color: var(--hot); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 10px 16px;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
  font-size: var(--fs-md); font-weight: 650; text-decoration: none;
}
.btn.primary { background: var(--hot); border-color: var(--hot); color: var(--on-hot); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: var(--on-ok); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: var(--fs-sm); border-radius: 10px; }
.btn.block { display: flex; width: 100%; margin-top: 10px; }
.icon-btn {
  width: 44px; height: 44px; flex: 0 0 auto;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 12px; background: transparent; color: var(--text); padding: 0;
}
.icon-btn:active { background: var(--surface-hi); }
.icon-btn[aria-pressed="true"] { background: var(--surface-hi); color: var(--hot-ink); }
.icon-btn.sm { width: 38px; height: 38px; border-radius: 10px; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 36px; padding: 6px 12px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text);
  font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
}
.chip-btn[aria-checked="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.link-btn {
  display: inline-flex; align-items: center; gap: 4px;
  border: 0; background: none; padding: 8px 0; min-height: 36px;
  color: var(--hot-ink); font-weight: 650; font-size: var(--fs-sm); text-align: start;
}
.pill { display: inline-block; font-size: calc(11px * var(--ts)); font-weight: 700; letter-spacing: .03em; padding: 3px 9px; border-radius: 999px; background: var(--surface-hi); color: var(--muted); }
.pill.warm { background: var(--warm); color: var(--on-hot); }
.pill.sm { font-size: calc(10px * var(--ts)); padding: 2px 6px; margin-inline-start: 6px; vertical-align: 2px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.chip-row.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
.chip-row.scroll::-webkit-scrollbar { display: none; }

/* ---------- form controls ---------- */

.seg { display: inline-flex; background: var(--surface-hi); border-radius: 10px; padding: 3px; gap: 2px; max-width: 100%; flex-wrap: wrap; }   /* long labels (Hindi, larger text) take a second line rather than get cut */
.seg button { border: 0; background: transparent; color: var(--muted); font-size: var(--fs-sm); font-weight: 650; padding: 6px 11px; border-radius: 8px; min-height: 34px; white-space: nowrap; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.switch { width: 50px; height: 30px; border-radius: 999px; background: var(--surface-hi); border: 1px solid var(--line); position: relative; flex: 0 0 auto; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch[aria-checked="true"] { background: var(--hot); border-color: var(--hot); }
.switch[aria-checked="true"]::after { transform: translateX(20px); background: var(--on-hot); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.step-btn { width: 40px; height: 40px; border: 0; background: transparent; display: grid; place-items: center; color: var(--text); border-radius: 10px; padding: 0; flex: 0 0 auto; }
.step-val { min-width: 28px; text-align: center; font-size: calc(19px * var(--ts)); }
.num-in, .text-in {
  width: 100%; min-height: 42px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text);
  padding: 8px 10px; font-size: calc(16px * var(--ts));
}
.num-in { text-align: center; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 600; font-size: calc(18px * var(--ts)); }
.num-in::placeholder { color: var(--faint); font-weight: 500; }
.num-in.wide { max-width: 110px; }
.num-in.big { max-width: 140px; min-height: 54px; font-size: calc(26px * var(--ts)); }
textarea.text-in { resize: vertical; line-height: 1.45; }
select.text-in { padding-inline-end: 6px; }
.unit { color: var(--muted); font-size: var(--fs-sm); }
.inline { display: flex; align-items: center; gap: 8px; }
.field { display: grid; gap: 6px; margin: 14px 0; }
.field-label { font-size: var(--fs-sm); color: var(--muted); font-weight: 650; }
.field .hint { margin: 0; }
.form-row { display: flex; align-items: center; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.form-row > label { min-width: 52px; font-weight: 650; font-size: var(--fs-sm); }
.search-wrap { position: relative; display: flex; align-items: center; }
.search-wrap > .ico { position: absolute; inset-inline-start: 13px; color: var(--muted); pointer-events: none; }
.search-in {
  width: 100%; min-height: 48px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text);
  padding-block: 10px; padding-inline: 44px 12px; font-size: calc(16px * var(--ts));
}
.search-in.sm { min-height: 42px; padding-inline-start: 12px; margin: 10px 0 4px; }

/* ---------- Today: top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.topbar-row { display: flex; align-items: center; gap: 2px; padding: 8px 6px 2px 12px; }
.prog-pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 70%;
  padding: 5px 12px 5px 5px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: var(--fs-lg);
}
.prog-pill b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; }   /* a Latin name in Arabic truncates at its own end */
.prog-emoji { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-hi); display: grid; place-items: center; font-size: calc(19px * var(--ts)); flex: 0 0 auto; }
.prog-emoji.lg { width: 56px; height: 56px; font-size: calc(30px * var(--ts)); }
.day-chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px 10px; scrollbar-width: none; }
.day-chips::-webkit-scrollbar { display: none; }
.day-chip {
  flex: 0 0 auto; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 44px; padding: 4px 14px; line-height: 1.15;
  border-radius: 12px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: var(--fs-sm); font-weight: 650; white-space: nowrap;
}
.day-chip small { font-size: calc(10px * var(--ts)); letter-spacing: .07em; text-transform: uppercase; font-weight: 750; opacity: .75; }
.day-chip[aria-selected="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.dot { position: absolute; top: 5px; inset-inline-end: 5px; width: 7px; height: 7px; border-radius: 50%; }
.dot.live { background: var(--hot); }
.dot.ok { background: var(--ok); }

.sessbar { padding: 0 8px 10px 14px; }
.sess-row { display: flex; align-items: center; gap: 4px; }
.sess-info { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.sess-info b { font-size: calc(28px * var(--ts)); line-height: 1; }
.sess-info span { color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sess-segs { display: flex; gap: 3px; margin: 8px 6px 0 0; }
.sess-segs i { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-hi); }
.sess-segs i.done { background: var(--ok); }
.sess-segs i.part { background: linear-gradient(90deg, var(--ok) var(--p, 50%), var(--surface-hi) var(--p, 50%)); }
.sess-segs i.skip { background: var(--line-strong); opacity: .5; }

.day-intro { display: flex; align-items: flex-end; gap: 12px; padding: 18px 16px 8px; }
.day-intro-text { flex: 1; min-width: 0; }
.day-title { margin: 0; font-size: var(--fs-2xl); font-weight: 780; letter-spacing: -.02em; line-height: 1.08; text-wrap: balance; }
.day-focus { margin: 5px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.day-intro .pill { margin-top: 8px; }
.start-btn { flex: 0 0 auto; }

/* ---------- Today: exercise cards ---------- */

.ex-list { display: flex; flex-direction: column; gap: 8px; padding: 8px 12px 0; }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card.current { border-color: var(--hot); box-shadow: 0 0 0 1px var(--hot); }
.card.done:not(.open) { background: var(--surface-2); }
.card.skipped:not(.open) .card-name { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.card.in-ss { border-inline-start: 4px solid var(--warm); }
.card.in-ss:not(.ss-last) { border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; }
.card.in-ss:not(.ss-first) { border-top-left-radius: 4px; border-top-right-radius: 4px; margin-top: -5px; }
.ss-label { display: flex; align-items: center; gap: 5px; padding: 8px 12px 0; font-size: calc(11px * var(--ts)); font-weight: 780; letter-spacing: .07em; text-transform: uppercase; color: var(--hot-ink); }
.card-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 4px 10px 10px; min-height: 68px; cursor: pointer; }
.thumb { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 10px; object-fit: cover; background: var(--art); display: grid; place-items: center; }
.thumb.ph { background: var(--surface-hi); color: var(--muted); font-size: calc(9px * var(--ts)); font-weight: 800; letter-spacing: .05em; overflow: hidden; }
.card-name { font-weight: 680; font-size: var(--fs-md); line-height: 1.25; }
.card-meta { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; line-height: 1.35; }
.card-right { display: flex; align-items: center; }
.tick { width: 28px; height: 28px; margin-inline-end: 10px; border-radius: 50%; background: var(--ok); color: var(--on-ok); display: grid; place-items: center; }
.tick .ico { width: 16px; height: 16px; }
.tick.skip { background: var(--surface-hi); color: var(--muted); }
.card-right > .ico.muted { margin-inline-end: 10px; }
.card-body { padding: 0 12px 12px; }
.coach { display: flex; gap: 8px; align-items: flex-start; background: var(--surface-2); border-radius: 10px; padding: 9px 10px; margin-bottom: 10px; font-size: var(--fs-sm); line-height: 1.4; }
.coach .ico { width: 18px; height: 18px; color: var(--muted); }
.coach.up { background: var(--hot-soft); }
.coach.up .ico { color: var(--hot-ink); }
.ex-note { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 10px; font-size: var(--fs-sm); color: var(--muted); white-space: pre-wrap; }
.ex-note.today { margin: 8px 0 0; font-style: italic; }

.sets { position: relative; z-index: 0; display: grid; gap: 7px; }
.set-row { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) 74px 62px 48px; gap: 6px; align-items: center; }
.sets.with-rir .set-row { grid-template-columns: 32px minmax(0, 1fr) 64px 52px 46px 46px; }
.set-headrow { font-size: calc(10.5px * var(--ts)); font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); text-align: center; }
.set-headrow span:nth-child(2) { text-align: start; padding-inline-start: 6px; }
.set-headrow span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* long words (Arabic "Set") stay in their column */
.set-type { height: 42px; border: 0; border-radius: 9px; background: var(--surface-hi); padding: 0; font-family: var(--font-num); font-weight: 700; font-size: calc(17px * var(--ts)); color: var(--text); }
.set-row.warmup .set-type { color: var(--hot-ink); }
.set-row.drop .set-type { color: var(--warm); }
.set-row.fail .set-type { color: var(--danger); }
.set-prev { font-size: calc(13px * var(--ts)); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.set-row .num-in { min-height: 42px; padding: 6px 2px; }
.rir-in { min-height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: center; text-align-last: center; padding: 0 2px; font-size: calc(16px * var(--ts)); }
.set-check { height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-hi); color: var(--faint); display: grid; place-items: center; padding: 0; }
.set-check[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: var(--on-ok); }
.set-row.done::before { content: ""; position: absolute; inset: -3px -6px; border-radius: 12px; background: var(--ok-soft); z-index: -1; }
.set-row.done .num-in { border-color: transparent; background: color-mix(in srgb, var(--surface) 55%, transparent); }
.pr-tag { position: absolute; inset-inline-end: -5px; top: -7px; padding: 1px 5px; border-radius: 6px; background: var(--hot); color: var(--on-hot); font-size: calc(9px * var(--ts)); font-weight: 800; letter-spacing: .05em; pointer-events: none; }
.card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.note-in { width: 100%; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); padding: 8px 10px; font-size: calc(16px * var(--ts)); resize: vertical; }
.howto { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 4px; }
.howto summary { display: flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; list-style: none; font-weight: 650; font-size: var(--fs-sm); }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::after { content: "+"; margin-inline-start: auto; color: var(--muted); font-size: calc(20px * var(--ts)); line-height: 1; }
.howto[open] summary::after { content: "-"; }
.howto summary small { color: var(--muted); font-weight: 500; }
.howto-img, .detail-img { display: block; width: 100%; max-width: 440px; margin: 6px auto 10px; border-radius: 12px; background: var(--art); }
.cue { margin: 6px 0 8px; line-height: 1.5; }
.muscles { margin: 6px 0; font-size: var(--fs-sm); color: var(--muted); line-height: 1.6; }
.muscles b { color: var(--text); font-weight: 650; }

.day-foot { padding: 18px 12px 8px; }
.day-foot .row-btns .btn { flex: 1 1 140px; }
.empty { color: var(--muted); text-align: center; padding: 28px 16px; font-size: var(--fs-sm); }
.empty-state { display: grid; justify-items: center; gap: 14px; padding: 40px 20px; text-align: center; color: var(--muted); }

/* ---------- pages ---------- */

.page-head { padding: calc(20px + env(safe-area-inset-top)) 16px 6px; }
.page-head h1 { margin: 0; font-size: var(--fs-2xl); font-weight: 780; letter-spacing: -.02em; }
.panel-card { margin: 10px 12px; padding: 14px 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.card-title { margin: 0; font-size: var(--fs-lg); font-weight: 720; }
.sec-title { margin: 24px 0 8px; font-size: calc(12px * var(--ts)); font-weight: 780; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sheet-sec { margin-top: 18px; }
.sheet-sec > .sec-title { margin-top: 0; }

.big-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; }
.big { font-size: calc(48px * var(--ts)); line-height: 1; }
.big-row > span { color: var(--muted); font-size: var(--fs-sm); }
.delta { padding: 2px 9px; border-radius: 999px; background: var(--surface-hi); color: var(--text) !important; font-weight: 700; }
.quick-log { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.quick-label { flex: 1; font-weight: 650; font-size: var(--fs-sm); }
.quick-log .step-btn { border: 1px solid var(--line); background: var(--surface-2); }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; font-size: calc(12px * var(--ts)); color: var(--muted); }
/* scoped: a bare .lg also matched the large emoji tile (.prog-emoji.lg) and squared it off */
.legend .lg { display: inline-block; width: 16px; height: 3px; border-radius: 2px; margin-inline-start: 10px; }
.legend .lg:first-child { margin-inline-start: 0; }
.lg.main { background: var(--hot); }
.lg.avg { background: var(--text); opacity: .5; }

/* ---------- charts ---------- */

.chart { margin-top: 10px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.c-grid { stroke: var(--line); stroke-width: .8; }
.c-tick { fill: var(--muted); font-size: calc(10px * var(--ts)); font-family: var(--font); }
.c-line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.c-line.main { stroke: var(--hot); }
.c-line.avg { stroke: var(--text); stroke-opacity: .5; stroke-width: 2; }
.c-area { fill: var(--hot); fill-opacity: .13; }
.c-dot { fill: var(--hot); }
.c-end { fill: var(--surface); stroke: var(--hot); stroke-width: 2.4; }
.chart-empty { padding: 24px 0; text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.chart-wrap { margin-top: 8px; }

/* ---------- sets per muscle ---------- */

.week-nav { display: flex; align-items: center; gap: 2px; font-size: var(--fs-sm); color: var(--muted); }
.mbars { display: grid; gap: 8px; margin-top: 12px; }
.mbar { display: grid; grid-template-columns: 76px minmax(0, 1fr) 46px; gap: 8px; align-items: center; font-size: var(--fs-sm); }
.mbar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbar-track { position: relative; height: 12px; border-radius: 4px; background: var(--surface-hi); }
.mbar-band { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--ok) 18%, transparent); border-left: 1px dashed var(--line-strong); border-inline-end: 1px dashed var(--line-strong); }
.mbar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--hot); }
.mbar-fill.met { background: var(--ok); }
.mbar-plan { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--text); }
.mbar-val { text-align: end; font-size: calc(15px * var(--ts)); }

/* ---------- lists ---------- */

.kv-list { display: grid; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.kv:first-child { border-top: 0; }
.kv b { font-weight: 650; text-align: end; }
.kv b small { color: var(--muted); font-weight: 400; }
.kv.up b { color: var(--hot-ink); }
.kv.editable .num-in { width: 92px; min-height: 38px; }

.hist-list { padding: 0 12px; }
.hist-month { margin: 22px 4px 8px; font-size: calc(12px * var(--ts)); font-weight: 780; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hist-row { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 62px; margin-bottom: 6px; padding: 10px 6px 10px 12px; text-align: start; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.hist-date { display: grid; justify-items: center; width: 38px; flex: 0 0 auto; line-height: 1.05; }
.hist-date b { font-size: calc(26px * var(--ts)); }
.hist-date small { font-size: calc(11px * var(--ts)); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.hist-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.hist-main b { font-weight: 680; }
.hist-main small { color: var(--muted); font-size: calc(12.5px * var(--ts)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-rec-list .hist-row { margin: 0; padding-inline: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.ex-rec-list .hist-row:first-child { border-top: 0; }
.ex-rec-list .thumb { width: 42px; height: 42px; }
.pr-badge { flex: 0 0 auto; padding: 3px 6px; border-radius: 6px; background: var(--hot); color: var(--on-hot); font-size: calc(10px * var(--ts)); font-weight: 800; letter-spacing: .05em; }
.hist-line { padding: 10px 0; border-top: 1px solid var(--line); }
.sheet-sec .hist-line:first-of-type { border-top: 0; }
.hist-line-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: var(--fs-sm); }
.hist-line-head .link-btn { padding: 0; min-height: 0; color: var(--text); font-size: var(--fs-md); }
.hist-sets { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.set-chip { padding: 2px 7px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); font-size: calc(12.5px * var(--ts)); font-variant-numeric: tabular-nums; }
.set-chip.warmup { color: var(--muted); }
.set-chip.pr { border-color: var(--hot); background: var(--hot-soft); }

.streak-card { display: flex; align-items: center; gap: 14px; }
.ico.flame { width: 42px; height: 42px; color: var(--hot); }
.streak-big { color: var(--muted); }
.streak-big b { margin-inline-end: 4px; font-size: calc(40px * var(--ts)); line-height: 1; color: var(--text); }

/* ---------- calendar ---------- */

.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { padding: 2px 0; text-align: center; font-size: calc(11px * var(--ts)); font-weight: 700; color: var(--muted); }
.cal-day { aspect-ratio: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; border: 1px solid transparent; border-radius: 9px; background: none; color: var(--muted); }
.cal-day.pad { visibility: hidden; }
.cal-day b { font-size: calc(13px * var(--ts)); font-weight: 600; }
.cal-day i { font-size: calc(9.5px * var(--ts)); font-style: normal; font-variant-numeric: tabular-nums; }
.cal-day.today { border-color: var(--hot); color: var(--text); }
.cal-day.wk { background: var(--hot); color: var(--on-hot); }
.cal-day.rest { background: var(--surface-hi); }
.cal-day.has { background: var(--surface-hi); color: var(--text); }
.cal-day.sel { background: var(--text); color: var(--bg); }
.cal-day.disabled { opacity: .35; }
.rest-chip { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; background: var(--surface-hi); font-size: calc(10px * var(--ts)); }

/* ---------- stats, finish, PRs ---------- */

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.stat { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.stat b { display: block; font-size: calc(32px * var(--ts)); line-height: 1.05; }
.stat span { font-size: calc(12px * var(--ts)); color: var(--muted); }
.stat em { font-style: normal; font-weight: 700; color: var(--muted); }
.stat em.good { color: var(--ok-ink); }
.celebrate { display: flex; align-items: center; gap: 12px; }
.mascot-sm { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: var(--art); }
.celebrate b { display: block; font-size: var(--fs-xl); font-weight: 780; letter-spacing: -.01em; }
.celebrate span { color: var(--muted); font-size: var(--fs-sm); }
.pr-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.sheet-sec .pr-row:first-of-type { border-top: 0; }
.pr-main b { display: block; font-weight: 680; font-size: var(--fs-sm); }
.pr-main small { color: var(--muted); font-size: calc(12px * var(--ts)); }
.pr-up { color: var(--ok-ink); font-weight: 780; font-size: var(--fs-sm); }
.big-num { margin: 8px 0 14px; text-align: center; font-size: calc(60px * var(--ts)); line-height: 1; }

.plates-out { margin-top: 14px; text-align: center; }
.bar-visual { display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 110px; }
.sleeve { width: 60px; height: 10px; border-radius: 3px; background: var(--line-strong); }
.plate { width: 24px; border-radius: 4px; background: var(--hot); color: var(--on-hot); font-size: calc(10px * var(--ts)); font-weight: 800; display: grid; place-items: center; writing-mode: vertical-rl; }
.plates-text { margin: 10px 0 0; font-weight: 680; }

/* ---------- sheets and screens ---------- */

.overlay { position: fixed; inset: 0; z-index: 80; }
.overlay .panel { display: flex; flex-direction: column; width: 100%; max-width: 620px; background: var(--bg); color: var(--text); }
.overlay .panel:focus { outline: none; }   /* focused on open so Escape and Tab work; the ring belongs on controls */
.overlay.sheet { display: flex; align-items: flex-end; justify-content: center; background: transparent; transition: background .18s; }
.overlay.sheet.in { background: var(--scrim); }
.overlay.sheet .panel { max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1); }
.overlay.sheet.in .panel { transform: none; }
.overlay.full { display: flex; justify-content: center; background: var(--bg); opacity: 0; transform: translateX(28px); transition: opacity .18s, transform .24s cubic-bezier(.2, .8, .2, 1); }
.overlay.full.in { opacity: 1; transform: none; }
.overlay.full .panel { height: 100%; }
.panel-head { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; padding: 10px 6px 4px 18px; }
.overlay.full .panel-head { padding: calc(6px + env(safe-area-inset-top)) 6px 6px 4px; border-bottom: 1px solid var(--line); }
.panel-title { flex: 1; margin: 0; font-size: var(--fs-lg); font-weight: 720; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 16px 24px; -webkit-overflow-scrolling: touch; }
.overlay.full .panel-body { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.panel-foot { flex: 0 0 auto; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.panel-foot .btn.block { margin: 0; }
.sheet-actions { display: flex; gap: 8px; margin-top: 18px; }
.sheet-actions .btn { flex: 1; }
.sheet-actions.minor { margin-top: 6px; }
.sheet-actions.minor .btn { color: var(--muted); }
.sheet-actions.minor .btn.danger { color: var(--danger); }

.menu-item { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 8px 4px; text-align: start; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); }
.overlay.menu .panel-body > .menu-item:first-child, .menu-list > .menu-item:first-child { border-top: 0; }
.menu-item .ico { color: var(--muted); }
.menu-item.danger, .menu-item.danger .ico { color: var(--danger); }
.menu-item.current .menu-label { color: var(--hot-ink); }
.menu-label { flex: 1; min-width: 0; display: grid; gap: 1px; font-weight: 620; }
.menu-label small { font-weight: 400; color: var(--muted); font-size: calc(12.5px * var(--ts)); }
.menu-emoji { width: 22px; text-align: center; font-size: calc(20px * var(--ts)); }
.menu-list { margin-top: 4px; }

/* ---------- picker ---------- */

.overlay.picker .search-wrap { position: sticky; top: -6px; z-index: 2; padding-top: 6px; background: var(--bg); }
.pick-count { min-height: 1.2em; margin: 0 0 2px; }
.pick-list { display: grid; }
.pick-row { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 8px 2px; text-align: start; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); }
.pick-row:first-child { border-top: 0; }
.pick-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pick-name { font-weight: 620; }
.pick-main small { color: var(--muted); font-size: calc(12.5px * var(--ts)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-check { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); }
.pick-row[aria-selected="true"] .pick-check { background: var(--hot); border-color: var(--hot); color: var(--on-hot); }
.pick-row.create .pick-name { color: var(--hot-ink); }
.pick-group { margin: 14px 2px 2px; font-size: calc(11px * var(--ts)); font-weight: 780; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pick-group + .pick-row { border-top: 0; }
.sec-ico { color: var(--hot-ink) !important; background: var(--hot-soft) !important; }
.sec-ico .ico { width: 24px; height: 24px; }
.pick-main small.wrap { white-space: normal; line-height: 1.35; }
.pkg-reason { display: flex; gap: 6px; align-items: flex-start; margin: 10px 0 0; padding: 9px 10px; border-radius: 10px; background: var(--surface-2); font-size: var(--fs-sm); line-height: 1.4; }
.pkg-reason .ico { margin-top: 2px; color: var(--muted); }
.section-label { display: flex; align-items: center; gap: 6px; margin: 14px 4px 2px; font-size: calc(11px * var(--ts)); font-weight: 780; letter-spacing: .08em; text-transform: uppercase; color: var(--hot-ink); }
.sec-head {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 46px;
  margin: 6px 0 0; padding: 8px 10px; text-align: start;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--hot-ink);
  font-size: calc(12px * var(--ts)); font-weight: 780; letter-spacing: .06em; text-transform: uppercase;
}
.sec-head-row { display: flex; align-items: center; gap: 2px; margin-top: 6px; }
.sec-head-row .sec-head { flex: 1; margin-top: 0; }
.sec-head-row > .icon-btn { color: var(--muted); }
.sec-head.main { color: var(--text); background: transparent; border-color: transparent; padding-inline: 4px; }
.item-edit.today-only { border-style: dashed; background: transparent; }
.item-edit.today-only .edit-main small { color: var(--hot-ink); }
/* the title keeps its words whole; the count wraps instead (large text) */
.sec-head b { white-space: nowrap; flex: 0 0 auto; }
.sec-head small { margin-inline-start: auto; text-align: end; min-width: 0; font-size: calc(11.5px * var(--ts)); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.sec-head > .ico:last-child { transition: transform .15s ease; color: var(--muted); }
.sec-head.open > .ico:last-child { transform: rotate(180deg); }
.set-na { display: block; }

/* ---------- editors ---------- */

.name-row { display: flex; gap: 8px; margin-top: 10px; }
.text-in.emoji-in { width: 62px; flex: 0 0 auto; text-align: center; font-size: calc(24px * var(--ts)); padding: 4px; }
.edit-list { display: grid; gap: 6px; }
.edit-row { display: flex; align-items: center; gap: 6px; padding: 6px 2px 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.day-num { width: 22px; text-align: center; font-size: calc(21px * var(--ts)); color: var(--muted); flex: 0 0 auto; }
.edit-main { flex: 1; min-width: 0; min-height: 44px; display: grid; gap: 2px; align-content: center; padding: 6px 2px; text-align: start; border: 0; background: none; color: var(--text); }
.edit-main b { font-weight: 680; }
.edit-main small { color: var(--muted); font-size: calc(12.5px * var(--ts)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edit-main.static { cursor: default; }
.edit-row .thumb { width: 40px; height: 40px; }
.item-list { display: grid; gap: 8px; }
.item-edit { padding: 8px 4px 10px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.item-edit.in-ss { border-inline-start: 4px solid var(--warm); }
.item-edit-head { display: flex; align-items: center; gap: 6px; }
.item-edit-head .thumb { width: 42px; height: 42px; }
.item-edit-fields, .form-grid { display: grid; grid-template-columns: auto minmax(0, .8fr) minmax(0, 1.2fr); gap: 8px; align-items: end; margin-top: 8px; padding-inline-end: 6px; }
.mini-field { display: grid; gap: 4px; min-width: 0; }
.mini-field > span { font-size: calc(10.5px * var(--ts)); font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ss-link { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: calc(12px * var(--ts)); font-weight: 650; color: var(--hot-ink); }
.note-edit { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.note-edit-head { display: flex; align-items: center; gap: 6px; }
.note-item { padding: 12px 0; border-top: 1px solid var(--line); }
.note-item:first-child { border-top: 0; }
.note-item summary { cursor: pointer; list-style: none; font-weight: 650; }
.note-item summary::-webkit-details-marker { display: none; }
.note-item p { margin: 8px 0 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.55; }

/* ---------- You ---------- */

.setting { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.card-title + .setting { border-top: 0; }
.setting-main { flex: 1 1 200px; display: grid; gap: 2px; }
.setting-main b { font-weight: 620; }
.setting-main small { color: var(--muted); font-size: calc(12.5px * var(--ts)); line-height: 1.4; }
.setting .num-in { width: 84px; }
.text-in.plates-in { flex: 1 1 100%; }
.prog-row { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--line); }
.card-title-row + .prog-row { border-top: 0; margin-top: 4px; }
.prog-row-main { flex: 1; min-width: 0; min-height: 62px; display: flex; align-items: center; gap: 12px; padding: 8px 0; text-align: start; border: 0; background: none; color: var(--text); }
.prog-row-text { display: grid; min-width: 0; }
.prog-row-text small { color: var(--muted); font-size: calc(12.5px * var(--ts)); }
.prog-row.current .prog-emoji { box-shadow: 0 0 0 2px var(--hot); }
.banner { display: flex; align-items: center; gap: 12px; margin: 10px 12px; padding: 12px 12px 12px 14px; border-radius: var(--radius); background: var(--hot-soft); }
.banner > div { flex: 1; display: grid; gap: 2px; font-size: var(--fs-sm); }
.banner span { color: var(--muted); }
.banner.info { background: var(--ok-soft); }

/* ---------- photos, share, weight ---------- */

.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.photo { position: relative; aspect-ratio: 3 / 4; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--surface-hi); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo span { position: absolute; inset-inline-start: 4px; bottom: 4px; padding: 1px 5px; border-radius: 5px; background: rgba(0, 0, 0, .55); color: #fff; font-size: calc(10px * var(--ts)); font-weight: 700; }
.photo-full { display: block; width: 100%; border-radius: 12px; }
.share-stage { display: grid; place-items: center; min-height: 240px; }
.share-preview { display: block; max-width: 100%; max-height: 58vh; max-height: 58dvh; border-radius: 12px; border: 1px solid var(--line); transition: opacity .15s; }
.share-preview.busy { opacity: .55; }
/* a see-through sticker is shown on a checkerboard, as image editors do */
.share-preview.sticker { background: repeating-conic-gradient(#8a8a8a 0 25%, #5a5a5a 0 50%) 0 0 / 24px 24px; }
.share-controls { display: grid; gap: 12px; margin-top: 14px; }
.share-controls .chip-row { margin: 0; }
.share-controls .hint { margin: 0; }
.weigh-today { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 4px 16px; margin-bottom: 4px; }
.weigh-today .field { margin: 10px 0; }

/* ---------- rest timer ---------- */

.rest-pill {
  position: fixed; z-index: 45; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 10px);
  width: calc(100% - 20px); max-width: 600px;
  display: flex; align-items: center; gap: 6px; padding: 6px;
  background: var(--text); color: var(--bg); border-radius: 18px; box-shadow: var(--shadow);
}
.rest-clock { flex: 1; min-width: 0; min-height: 50px; display: flex; align-items: center; gap: 10px; padding: 2px 6px; text-align: start; border: 0; background: none; color: inherit; }
.ring { width: 38px; height: 38px; flex: 0 0 auto; }
.ring-bg { fill: none; stroke: currentColor; stroke-opacity: .22; stroke-width: 4; }
.ring-fg { fill: none; stroke: var(--hot); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.rest-text { display: grid; line-height: 1.05; }
.rest-text small { font-size: calc(10px * var(--ts)); font-weight: 800; letter-spacing: .09em; opacity: .7; }
.rest-text b { font-size: calc(28px * var(--ts)); }
.rest-btn { min-width: 52px; min-height: 46px; padding: 0 10px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--bg) 16%, transparent); color: inherit; font-weight: 750; font-size: var(--fs-sm); }
.rest-btn.skip { background: var(--hot); color: var(--on-hot); }
.rest-pill.ringing { background: var(--hot); color: var(--on-hot); animation: rest-pulse 1.1s ease-in-out infinite; }
.rest-pill.ringing .ring-fg { stroke: var(--on-hot); }
.rest-pill.ringing .rest-btn.skip { background: var(--on-hot); color: var(--hot); }
@keyframes rest-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--hot) 30%, transparent); } }

/* ---------- bottom nav ---------- */

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.nav-item { position: relative; flex: 1; max-width: 150px; height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--muted); font-size: calc(11px * var(--ts)); font-weight: 680; }
.nav-item svg { width: 24px; height: 24px; }
.nav-item[aria-current="page"] { color: var(--hot-ink); }
.nav-dot { position: absolute; top: 9px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--hot); border: 2px solid var(--bg); }

/* ---------- toast ---------- */

.toast {
  position: fixed; z-index: 90; left: 50%;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px);
  transform: translate(-50%, 8px);
  width: max-content; max-width: calc(100% - 24px);
  display: flex; align-items: center; gap: 12px;
  padding: 9px 9px 9px 16px; border-radius: 14px;
  background: var(--text); color: var(--bg); box-shadow: var(--shadow);
  font-size: var(--fs-sm); font-weight: 620;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
body.resting .toast { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 86px); }
body.has-overlay .toast { bottom: calc(18px + env(safe-area-inset-bottom)); }
.toast-msg { padding: 5px 7px 5px 0; }
.toast-btn { min-height: 38px; padding: 8px 12px; border: 0; border-radius: 10px; background: var(--hot); color: var(--on-hot); font-weight: 780; white-space: nowrap; }

@media (min-width: 700px) {
  .ex-list, .day-foot { padding-inline: 16px; }
  .panel-card, .banner { margin-inline: 16px; }
}

/* ---------- onboarding ---------- */

body.onboarding .app, body.onboarding .nav, body.onboarding .rest-pill { display: none; }
.onboard { max-width: 560px; margin: 0 auto; min-height: 100dvh; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.onb-step { display: flex; flex-direction: column; min-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 8px 20px 20px; }
.onb-top { display: flex; align-items: center; gap: 8px; margin: 0 -10px 10px; }
.onb-dots { flex: 1; display: flex; gap: 5px; justify-content: center; }
.onb-dots span { width: 22px; height: 4px; border-radius: 2px; background: var(--line); transition: background .2s; }
.onb-dots span.on { background: var(--hot); }
.onb-title { margin: 14px 0 0; font-size: var(--fs-2xl); font-weight: 780; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
.onb-lead { margin: 10px 0 0; color: var(--muted); font-size: var(--fs-md); line-height: 1.5; }
.onb-foot { margin-top: auto; padding-top: 24px; }
.onb-foot.sticky { position: sticky; bottom: 0; margin-inline: -20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 75%, transparent); }
.onb-foot .btn.block:first-child { margin-top: 0; }
.onb-label { display: block; margin: 22px 0 8px; }

.onb-welcome { align-items: center; text-align: center; justify-content: center; }
.onb-mascot { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: var(--art); margin-top: 8vh; }
.onb-brand { margin: 18px 0 0; font-size: calc(40px * var(--ts)); font-weight: 800; letter-spacing: -.03em; }
.onb-welcome .onb-lead { max-width: 30ch; }
.onb-note { margin: 16px 0 0; font-size: var(--fs-sm); color: var(--muted); padding: 8px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); text-wrap: balance; }
.onb-welcome .onb-foot { width: 100%; }
.onb-signin-btn { margin-top: 12px; border-color: var(--hot); color: var(--hot-ink); background: transparent; }
:root[data-theme="dark"] .onb-signin-btn { color: var(--hot); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .onb-signin-btn { color: var(--hot); } }
.onb-lang { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.onb-region { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.onb-region .onb-label { margin-top: 18px; }
.onb-country { width: 100%; }
.onb-time { margin: 8px 0 4px; font-size: var(--fs-sm); color: var(--muted); }
.onb-restore { margin: 14px 0 0; font-size: var(--fs-sm); color: var(--muted); }
.onb-restore .link-btn { display: inline; padding: 0; min-height: 0; }

.onb-choices { display: grid; gap: 10px; margin-top: 22px; }
.onb-choice {
  display: grid; gap: 3px; text-align: start;
  min-height: 64px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
}
.onb-choice b { font-size: var(--fs-lg); font-weight: 720; }
.onb-choice small { color: var(--muted); font-size: var(--fs-sm); }
.onb-choice:active { background: var(--surface-hi); }
.onb-choice[aria-checked="true"] { border-color: var(--hot); box-shadow: 0 0 0 1px var(--hot); background: var(--hot-soft); }

.onb-name { width: 100%; margin-top: 22px; font-size: var(--fs-xl); padding: 12px 14px; }
.onb-age { width: 120px; font-size: var(--fs-lg); }
.onb-avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.onb-avatars.compact { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; margin-bottom: 6px; }
.onb-avatars.compact .onb-avatar { font-size: calc(21px * var(--ts)); }
.onb-avatar {
  aspect-ratio: 1; max-width: 100%; display: grid; place-items: center;
  font-size: calc(26px * var(--ts)); border-radius: 50%; padding: 0;
  border: 1px solid var(--line); background: var(--surface);
}
.onb-avatar[aria-checked="true"] { border-color: var(--hot); box-shadow: 0 0 0 2px var(--hot); background: var(--hot-soft); }

/* ---------- plan view (onboarding and plan library) ---------- */

.plan-view { margin-top: 14px; }
.plan-hero { padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.plan-hero-top { display: flex; align-items: center; gap: 12px; }
.plan-hero-top > div { display: grid; gap: 2px; min-width: 0; }
.plan-name { font-size: var(--fs-lg); font-weight: 750; }
.plan-hero-top small { color: var(--muted); font-size: var(--fs-sm); }
.plan-reason { margin: 12px 0 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--text); }
.plan-controls { display: grid; gap: 14px; margin-top: 16px; }
.plan-control { display: grid; gap: 6px; }
.plan-control .seg { justify-self: start; }
.plan-control.row { display: flex; align-items: center; gap: 12px; }
.plan-control.row small { display: block; margin-top: 2px; font-size: calc(12.5px * var(--ts)); }
.plan-days { display: grid; gap: 6px; }
.plan-day { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.plan-day-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; color: var(--text); text-align: start; }
.plan-day-head > .ico { color: var(--muted); transition: transform .15s; }
.plan-day.open .plan-day-head > .ico { transform: rotate(180deg); }
.plan-day-list { margin: 0; padding-block: 0 10px; padding-inline: 12px; display: grid; gap: 6px; font-size: var(--fs-sm); list-style: none; }
.plan-day-list li { display: flex; align-items: center; gap: 10px; }
.plan-day-list li > span:not(.thumb) { flex: 1 1 auto; min-width: 0; }
.thumb.plan-thumb { width: 36px; height: 36px; border-radius: 8px; }
.plan-day-list small { color: var(--muted); white-space: nowrap; }
.plan-warn { margin: 0 0 8px; padding: 10px 12px; border-radius: 12px; background: var(--hot-soft); color: var(--text); font-size: var(--fs-sm); line-height: 1.45; }
.plan-equip { width: 100%; border: 0; background: none; color: var(--text); text-align: start; padding: 0; }
.plan-equip small { display: block; margin-top: 2px; }
.seg-scroll { overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding-inline: 20px; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg-scroll .seg { flex-wrap: nowrap; }
.plan-day-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.plan-day-main b { font-weight: 680; }
.plan-day-main small { color: var(--muted); font-size: calc(12.5px * var(--ts)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-day-min { flex: 0 0 auto; color: var(--muted); font-size: calc(15px * var(--ts)); }
.plan-others { display: grid; gap: 6px; }
.plan-other { display: grid; gap: 3px; text-align: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text); }
.plan-other b { font-weight: 680; }
.plan-other small { color: var(--muted); font-size: calc(12.5px * var(--ts)); line-height: 1.45; }

/* ---------- equipment ---------- */

.equip .chip-row { margin: 18px 0 0; }
.equip-count { margin-top: 8px; }
.equip .sec-title { margin-top: 20px; }
.equip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }   /* two across on a phone, so the machine is big enough to recognise */
.equip-card {
  position: relative; display: grid; gap: 6px; align-content: start; padding: 6px 6px 8px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); text-align: center;
}
.equip-art { aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--art); display: block; }
.equip-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.equip-name { font-size: calc(12.5px * var(--ts)); font-weight: 650; line-height: 1.25; }
.equip-hint { font-size: calc(11px * var(--ts)); color: var(--muted); line-height: 1.3; margin-top: -3px; }
.equip-tick {
  position: absolute; top: -7px; inset-inline-end: -7px; width: 22px; height: 22px; border-radius: 50%;   /* on the corner, off the picture */
  display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-strong); color: transparent;
}
.equip-card[aria-checked="true"] { border-color: var(--hot); box-shadow: 0 0 0 1px var(--hot); }
.equip-card[aria-checked="true"] .equip-tick { background: var(--hot); border-color: var(--hot); color: var(--on-hot); }
.equip-card[aria-checked="false"] .equip-art { opacity: .7; }   /* stays in colour: the highlighted muscle is what tells machines apart */

.onb-toggles { display: grid; gap: 10px; margin-top: 22px; }
.onb-toggle { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.onb-toggle b { display: block; font-size: var(--fs-lg); font-weight: 720; }
.onb-toggle small { display: block; margin-top: 3px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }

.tip-card { margin: 4px 12px 10px; padding: 12px 14px 4px; border-radius: var(--radius); background: var(--hot-soft); border: 1px solid var(--line); }
.tip-card b { font-weight: 720; }
.checkin-card .row-btns { margin: 8px 0 8px; gap: 8px; }
.checkin-advice { margin-top: 16px; }
.tip-card p { margin: 4px 0 0; font-size: var(--fs-sm); line-height: 1.5; }

/* ---------- right to left (Arabic) ---------- */

[dir="rtl"] .switch[aria-checked="true"]::after { transform: translateX(-20px); }
[dir="rtl"] .overlay.full:not(.in) { transform: translateX(-28px); }
[dir="rtl"] .ico-back, [dir="rtl"] .ico-chevronR { transform: scaleX(-1); }
[dir="rtl"] .profile-row > .ico { transform: rotate(90deg); }
[dir="rtl"] .mbars, [dir="rtl"] .chart-wrap, [dir="rtl"] .bar-visual { direction: ltr; }

/* ---------- consent ---------- */

.consent-row { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.consent-row input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--hot); flex: 0 0 auto; }
.consent-row b { display: block; font-weight: 700; }
.consent-row small { display: block; margin-top: 3px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.consent-error { min-height: 1.2em; margin: 10px 0 0; color: var(--danger); font-size: var(--fs-sm); font-weight: 600; }
.notice-sec p { margin: 0 0 6px; line-height: 1.55; }

/* ---------- first-time tour ---------- */

.sess-hr { color: var(--danger); font-size: calc(17px * var(--ts)); font-weight: 700; margin-inline-end: 6px; }
.tour { position: fixed; inset: 0; z-index: 90; }
/* the lit area: a hole whose shadow dims everything else */
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(20, 12, 4, .62); transition: all .2s ease; pointer-events: none; }
.tour-card {
  position: fixed; left: 16px; right: 16px; max-width: 420px; margin: 0 auto;
  padding: 14px 16px 10px; border-radius: var(--radius); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.tour-count { margin: 0; font-size: calc(12px * var(--ts)); font-weight: 700; letter-spacing: .04em; color: var(--hot-ink); }
.tour-title { display: block; margin-top: 4px; font-size: var(--fs-lg); font-weight: 750; }
.tour-text { margin: 6px 0 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--muted); }
.tour-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }

/* ---------- profile ---------- */

.greet { margin: 0 0 4px; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.profile-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 4px 0; border: 0; background: none; color: var(--text); text-align: start; min-height: 62px; }
.profile-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: calc(28px * var(--ts)); background: var(--hot-soft); flex: 0 0 auto; }
.profile-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.profile-text b { font-size: var(--fs-lg); font-weight: 720; }
.profile-text small { color: var(--muted); font-size: calc(12.5px * var(--ts)); }

/* account: sign-in sheet and You → Account */
.acct-card .btn.block { margin-top: 12px; }
.acct-who { display: flex; align-items: center; gap: 12px; margin: 4px 0 6px; }
.acct-who .profile-avatar { width: 44px; height: 44px; font-size: calc(19px * var(--ts)); font-weight: 720; color: var(--hot-ink); }
.acct-who .profile-text b { font-size: var(--fs-md); overflow-wrap: anywhere; }
.acct-lead { margin: 0 0 12px; line-height: 1.45; }
.acct-points { margin: 0 0 18px; padding-inline-start: 20px; display: grid; gap: 6px; color: var(--muted); font-size: var(--fs-sm); }
.acct-google { min-height: 48px; display: flex; justify-content: center; margin: 0 0 14px; color-scheme: light; }  /* keeps Google's frame transparent in dark mode */
.onb-signin-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8px 0 24px; }
.onb-signin-main .onb-mascot { margin-bottom: 8px; }
.onb-signin-main .onb-lead { margin-bottom: 26px; }
.onb-google { width: 100%; max-width: 400px; margin: 0; }
.onb-optional { margin: 14px 0 6px; color: var(--muted); font-size: var(--fs-sm); }
.onb-why-btn { min-height: 40px; }
.onb-why { text-align: start; max-width: 400px; margin: 8px 0 0; }
.profile-row > .ico { transform: rotate(-90deg); color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Arabic letters join and Devanagari hangs from one headline bar: any
   letter-spacing breaks both, so it is off in those languages */
:root[lang="ar"] *, :root[lang="hi"] * { letter-spacing: 0 !important; }
/* the set number column is narrow; its label may spill evenly either side
   (Arabic, larger text) rather than be cut */
.set-headrow span:first-child { display: flex; justify-content: center; overflow: visible; text-overflow: clip; }

/* ---------- adjust today, feedback ---------- */
.day-tools { margin-top: 10px; display: grid; gap: 8px; }
.day-tools .chip-row { margin: 0; gap: 6px; }
.chip-btn.sm { min-height: 32px; padding: 4px 10px; font-size: var(--fs-sm); }
button.pill { border: 0; cursor: pointer; min-height: 28px; }
.recovery-note { margin: 0; font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; }
.coach.adj { background: var(--ok-soft); }
.coach.adj .ico { color: var(--ok-ink); }
.coach.amrap .ico { color: var(--hot-ink); }
.coach.down { background: var(--surface-hi); }
.feel-list { display: grid; gap: 10px; }
.feel-list .hint { margin: 0; }
.feel-row { display: grid; gap: 6px; }
.feel-name { font-weight: 700; font-size: var(--fs-sm); }
.feel-row .seg { width: 100%; }
.feel-row .seg button { flex: 1 1 auto; }

/* ---------- moving exercise art ---------- */
.motion { position: relative; width: min(100%, 300px); aspect-ratio: var(--motion-ratio, .89); margin: 6px auto 10px; border-radius: 12px; overflow: hidden; background: var(--art); }
.motion-full { display: none; width: 100%; height: auto; }
.motion-frame { position: absolute; top: 0; height: 100%; overflow: hidden; }
.motion-frame.f1 { left: 0; width: 100%; }
.motion-frame img { position: absolute; top: 0; height: 100%; max-width: none; }
/* each pose holds, then a short crossfade: less time half-and-half */
.motion .f2 { animation: motion-swap 2.8s ease-in-out infinite; }
@keyframes motion-swap { 0%, 42% { opacity: 0; } 50%, 92% { opacity: 1; } 100% { opacity: 0; } }
.motion.still { width: min(100%, 440px); aspect-ratio: auto; }
.motion.still .motion-full { display: block; }
.motion.still .motion-frame { display: none; }
.motion-toggle { position: absolute; bottom: 8px; inset-inline-end: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .5); color: #fff; display: grid; place-items: center; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .motion .f2 { animation: none; } }

/* ---------- interval timer ---------- */
.stepper { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-hi); border-radius: 12px; padding: 4px; }
.stepper-val { min-width: 84px; text-align: center; font-size: var(--fs-lg); }
.interval-field { grid-template-columns: 1fr auto; align-items: center; }
.interval-total { font-weight: 700; margin: 12px 0 0; }
.interval-screen { display: grid; justify-items: center; gap: 6px; padding: 26px 12px; margin-top: 4px; border-radius: 20px; background: var(--surface-2); text-align: center; transition: background .25s; }
.interval-screen.work { background: var(--hot); color: var(--on-hot); }
.interval-screen.rest { background: var(--ok-soft); }
.interval-screen.done { background: var(--surface-hi); }
.interval-screen.paused { opacity: .6; }
.interval-phase { font-size: calc(26px * var(--ts)); font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.interval-round { font-size: var(--fs-md); font-weight: 650; min-height: 1.4em; }
.interval-clock { font-family: var(--font-num); font-size: calc(96px * var(--ts)); font-weight: 700; line-height: 1; }
.interval-bar { width: 100%; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .12); overflow: hidden; margin-top: 10px; }
.interval-bar i { display: block; height: 100%; width: 0; background: currentColor; }

/* ---------- body map: the tiger with tinted muscle masks ---------- */
.tiger { position: relative; aspect-ratio: 2 / 3; width: 100%; }
.tiger-base, .tiger-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.tiger-layer { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; opacity: .82; pointer-events: none; }
.body-map { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; max-width: 420px; margin: 8px auto 0; direction: ltr; }
.body-map figure { margin: 0; cursor: pointer; }
.body-map figcaption { text-align: center; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); margin-top: 2px; }
.body-caption { text-align: center; font-size: var(--fs-sm); color: var(--muted); margin: 6px 0 8px; min-height: 1.4em; }
.body-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: var(--fs-sm); color: var(--muted); margin-bottom: 8px; }
.body-legend span { display: inline-flex; align-items: center; gap: 6px; }
.body-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.body-legend i.none { background: transparent; border: 1.5px solid var(--line-strong); }
.tiger-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 120px)); justify-content: center; gap: 8px; margin: 4px auto 8px; direction: ltr; }
.tiger-pair.n1 { grid-template-columns: minmax(0, 130px); }

/* ---------- strength level ---------- */
.str-row { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.str-row:first-of-type { border-top: 0; }
.str-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.str-badge { font-size: var(--fs-sm); font-weight: 750; padding: 2px 10px; border-radius: 999px; background: var(--surface-hi); color: var(--muted); }
.str-badge.l1 { background: var(--chip-soft, var(--surface-hi)); color: var(--text); }
.str-badge.l2 { background: var(--hot-soft); color: var(--hot-ink); }
.str-badge.l3, .str-badge.l4 { background: var(--hot); color: var(--on-hot); }
.str-bar { height: 8px; border-radius: 4px; background: var(--surface-hi); overflow: hidden; }
.str-bar i { display: block; height: 100%; background: var(--hot); border-radius: 4px; }
.str-row small { color: var(--muted); font-size: var(--fs-sm); }

/* ---------- recap and badges ---------- */
.recap-month { font-weight: 750; margin: 6px 0 0; }
.panel-card select.text-in + .stat-grid, .recap-month + .stat-grid { margin-top: 10px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 10px; }
.badge { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 12px 6px; border-radius: 14px; background: var(--surface-2); opacity: .55; }
.badge.got { opacity: 1; background: var(--hot-soft); }
.badge-icon { font-size: calc(30px * var(--ts)); line-height: 1; filter: grayscale(1); }
.badge.got .badge-icon { filter: none; }
.badge b { font-size: var(--fs-sm); line-height: 1.25; }
.badge small { font-size: calc(11px * var(--ts)); color: var(--muted); line-height: 1.3; }

/* ---------- classic programmes, gyms ---------- */
.classics { margin-top: 26px; }
.classic-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 10px; background: var(--surface); display: grid; gap: 8px; }
.classic-card p { margin: 0; font-size: var(--fs-sm); line-height: 1.5; }
.classic-card .btn { justify-self: start; }
.classic-head { display: flex; gap: 10px; align-items: center; }
.classic-head small { display: block; color: var(--muted); font-size: var(--fs-sm); }
.hint.warn { color: var(--danger); }
.gym-row { display: flex; align-items: center; gap: 4px; }
.gym-row .menu-item { flex: 1 1 auto; }
.menu-item.on .ico { color: var(--hot-ink); }
.field .inline { display: flex; align-items: center; gap: 8px; }
.field .inline .num-in { max-width: 160px; }
.pr-row { padding-inline-end: 10px; }
.pr-best { display: grid; justify-items: end; gap: 1px; flex: 0 0 auto; margin-inline-start: auto; padding: 6px 10px; border-radius: 10px; background: var(--hot-soft); line-height: 1.15; }
.pr-best small { font-size: calc(10.5px * var(--ts)); font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pr-best b { font-family: var(--font-num); font-weight: 700; color: var(--hot-ink); white-space: nowrap; font-size: var(--fs-md); }
.pr-row .hist-main { min-width: 0; }
.pick-pr { display: block; color: var(--hot-ink); font-weight: 650; }

/* ---------- onboarding: screens slide, choices confirm ---------- */
.onb-in-fwd { animation: onb-in-fwd .26s cubic-bezier(.2, .8, .2, 1) both; }
.onb-in-back { animation: onb-in-back .26s cubic-bezier(.2, .8, .2, 1) both; }
.onb-out-fwd { animation: onb-out-fwd .17s ease-in both; }
.onb-out-back { animation: onb-out-back .17s ease-in both; }
@keyframes onb-in-fwd { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
@keyframes onb-in-back { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }
@keyframes onb-out-fwd { to { opacity: 0; transform: translateX(-36px); } }
@keyframes onb-out-back { to { opacity: 0; transform: translateX(36px); } }
[dir="rtl"] .onb-in-fwd { animation-name: onb-in-back; }
[dir="rtl"] .onb-in-back { animation-name: onb-in-fwd; }
[dir="rtl"] .onb-out-fwd { animation-name: onb-out-back; }
[dir="rtl"] .onb-out-back { animation-name: onb-out-fwd; }
.onb-choice { transition: border-color .15s, background .15s, box-shadow .15s, transform .15s; }
.onb-choice.picked { transform: scale(.98); }
.onb-choice.picked b::after { content: " ✓"; color: var(--hot-ink); }
.onb-dots span { transition: background .25s, width .25s; }
.onb-dots span.now { width: 34px; }
@media (prefers-reduced-motion: reduce) {
  .onb-in-fwd, .onb-in-back, .onb-out-fwd, .onb-out-back { animation: none; }
}
.len-unit .seg { flex-wrap: nowrap; }
.len-unit .seg button, .inline .seg button { min-height: 30px; padding: 4px 10px; }
.inline .seg { flex-wrap: nowrap; flex: 0 0 auto; }
