/* SahiForm — the brand from the deck: white, grape ink, cream panels, cards in
   tangerine, lime and pink with a hard grape shadow, Righteous for display and
   Nunito for everything else. The Review page keeps its dark workbench. */
:root {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #fff3e2; --cream: #fff3e2; --line: #e9d6bf;
  --ink: #2b1546; --muted: #6b5a82; --grape: #2b1546;
  --pink: #ff2e88; --tangerine: #ffb830; --lime: #b8f542;
  --good: #2e9e5b; --warn: #d98a00; --bad: #e0245e; --accent: #2b1546;
  --r: 16px; --shadow: 6px 6px 0 var(--grape);
  --font-display: 'Righteous', 'Nunito', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Nunito', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --stage-h: 62vh;      /* how much of the screen the picture may take, so the set button stays on it */
  /* the muscle figure's palette (anatomy.js reads these) */
  --fig-skin: #f6e3c8; --fig-line: #c9a878; --fig-muscle: #e7cda9; --fig-far: #efe0c8; --fig-farline: #dcc6a4; --fig-floor: rgba(0,0,0,.05);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
/* links in the words: the palette's, not the browser's blue (buttons, chips and the foot have their own) */
a { color: var(--grape); text-underline-offset: 2px; }
a:not([class]):hover { color: var(--pink); }   /* a plain link only: never a button or a chip made of one */
body {
  background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font-body);
  padding: 0 16px calc(32px + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%;
}
main { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; }
h1, h2, h3 { margin: 0; }
h2 { font: 700 1rem/1.3 var(--font-body); margin-bottom: 8px; }
h2.gap { margin-top: 14px; }
.lede { margin: 6px 0 0; color: var(--muted); font-weight: 700; }
/* settings (the gear on the bar): one column of selects, each no wider than the sheet */
.grid.prefs-grid { grid-template-columns: 1fr; }   /* .grid, later in the file, would put them side by side */
.prefs-grid label { min-width: 0; }
.prefs-grid select { width: 100%; max-width: 100%; min-width: 0; }
#prefs .row.end { margin-top: 14px; }
.center { text-align: center; }

/* ---- the bar: three stripes, the mark, a search, the info button ---- */
.topbar {
  position: sticky; top: 0; z-index: 30; background: var(--bg);
  display: flex; align-items: center; gap: 10px; padding: 18px 0 10px; margin: 0 -16px 0; padding-inline: 16px;
  border-bottom: 2px solid var(--line);
}
.topbar::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 9px;
  background: linear-gradient(to bottom, var(--tangerine) 0 3px, var(--lime) 3px 6px, var(--pink) 6px 9px); }
.brand { text-decoration: none; color: inherit; flex: 0 0 auto; }
.wordmark { font: 400 1.45rem/1 var(--font-display); letter-spacing: -.01em; color: var(--grape); }
.nav-title { font: 400 1.1rem/1.2 var(--font-display); flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search {
  flex: 1 1 120px; min-width: 0; min-height: 40px; padding: 8px 12px; border-radius: 999px;
  border: 2px solid var(--grape); background: var(--surface); color: var(--ink); font: 700 .92rem var(--font-body);
}
.search::placeholder { color: var(--muted); font-weight: 600; }
.iconbtn {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 999px; border: 2px solid var(--grape); background: var(--surface);
  color: var(--grape); font: 900 1rem var(--font-body); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none;
}
.iconbtn.back { font-size: 1.6rem; line-height: 1; padding-bottom: 3px; }
.i-mark { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-weight: 900; }
body:not(.at-home) .search { display: none; }
body.at-home .nav-title, body.at-home .back, body.at-ex .nav-title { display: none; }
body.at-live .topbar { display: none; }

.chip {
  margin-left: auto; font-size: .72rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; background: var(--cream); border: 2px solid var(--line); color: var(--muted);
}
.chip.good { background: rgba(184,245,66,.45); border-color: var(--lime); color: var(--grape); }
.chip.warn { background: rgba(255,184,48,.35); border-color: var(--tangerine); color: var(--grape); }
.chip.bad  { background: rgba(255,46,136,.2); border-color: var(--pink); color: var(--grape); }

/* ---- how it works ---- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(43,21,70,.6); display: grid; place-items: center; padding: 16px; }
[hidden] { display: none !important; }
.modal[hidden] { display: none; }
.modal-in { position: relative; background: var(--surface); border: 2px solid var(--grape); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; max-width: 460px; width: 100%; max-height: 92vh; overflow: auto; overflow-x: hidden; }
.modal-in h2 { font: 400 1.5rem/1.2 var(--font-display); margin-bottom: 12px; }
.modal .close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; }
.row.end { justify-content: flex-end; }
.row.end .btn { flex: 0 0 auto; min-width: 120px; }
.topbar #btn-how { margin-left: auto; }
/* the info panel: set-up animations A (the home page options canvas): a cream sheet, the step count and Skip on top,
   the drawing on a white card with a hard shadow, the words, round arrows and the dots below */
.modal-in.how { background: var(--cream); border: 0; border-radius: 28px; padding: 14px 20px 22px; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.how-top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.how-top .how-count { font-size: .82rem; font-weight: 800; letter-spacing: 1.5px; color: var(--muted); }
.how-skip { background: none; border: 0; padding: 12px 4px; font: inherit; font-weight: 800; font-size: .95rem; color: var(--muted); cursor: pointer; }
.how-skip.done { color: var(--grape); }
.how-steps { list-style: none; margin: 0; padding: 0; }
.how-steps > li { display: none; }
.how-steps > li.on { display: flex; flex-direction: column; gap: 10px; }
.how-art { width: 100%; max-width: 350px; aspect-ratio: 1; margin: 0 auto 8px; box-sizing: border-box; background: #fff; border-radius: 28px; box-shadow: 6px 7px 0 var(--grape); overflow: hidden; padding: 5px; }
.how-art .anim { display: block; width: 100%; height: 100%; }
.how-steps h3 { margin: 0; font: 400 clamp(1.6rem, 7vw, 2.1rem)/1.1 var(--font-display); color: var(--grape); }
.how-steps p { margin: 0; font-size: 1.05rem; line-height: 1.45; color: var(--muted); font-weight: 600; min-height: 3em; }
.how-best { list-style: none; margin: 0 -12px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.how-best li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 14px; opacity: .55; transition: opacity .2s, background .2s; }
.how-best li.lit { background: #fff; opacity: 1; }
.how-best svg { flex: none; fill: none; stroke: var(--grape); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.how-best span { font-size: 1rem; font-weight: 800; line-height: 1.3; color: var(--grape); }
.how-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.how-arrow { flex: none; width: 60px; height: 60px; display: grid; place-items: center; padding: 0; border: 2px solid var(--grape); border-radius: 999px; background: transparent; color: var(--grape); cursor: pointer; }
.how-arrow:disabled { border-color: #D9C2FF; opacity: .4; cursor: default; }
.how-arrow.go { background: var(--grape); border-color: var(--grape); box-shadow: 4px 5px 0 var(--pink); }
.how-arrow .done { display: none; }
.how-arrow.go.last > svg { display: none; }
.how-arrow.go.last .done { display: grid; }
.how-dots { display: flex; gap: 6px; align-items: center; }
.how-dots i { width: 8px; height: 8px; border-radius: 4px; background: #D9C2FF; transition: width .2s; }
.how-dots i.past { background: var(--grape); }
.how-dots i.on { width: 22px; background: var(--grape); }

/* ---- the exercises, as a list: the name, what it works, a coloured mark ---- */
.list { display: block; margin: 8px 0 0; border-top: 2px solid var(--grape); }
.item {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; padding: 12px 4px 12px 2px;
  border-bottom: 2px solid var(--line); color: var(--grape); text-decoration: none; cursor: pointer;
}
.item:active { background: var(--cream); }
.item[hidden] { display: none; }
.item .fig { width: 64px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--cream); border-radius: 10px; overflow: hidden; }
.item .fig svg { width: 60px; height: 40px; max-width: none; margin: 0; overflow: visible; }
.item .fig .lbl { display: none; }
/* the plain stick figure (Figure.svg): the home tiles and an exercise's second angle */
.stick .ink { fill: none; stroke: var(--grape); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.stick circle.ink { fill: var(--grape); stroke: none; }
.stick .far { opacity: .35; }
.stick .floor { fill: none; stroke: var(--line); stroke-width: 4; }
.stick.view-iso .floor { fill: var(--cream); stroke: var(--line); stroke-width: 2; }
.stick .cam { fill: var(--grape); }
.stick .lbl { font: 700 11px var(--font-body); fill: var(--muted); }
/* equipment in the stick figure (props.js): a light fill and the figure's warm line; metal dark, fabric soft, a band pink */
:root { --prop-fill: #fbe2c0; --prop-line: #c9a878; --prop-dark: #7a6650; --prop-soft: #f3d9b8; }
.stick .prop .part { fill: var(--prop-fill); stroke: var(--prop-line); stroke-width: 1.5; stroke-linejoin: round; }
.stick .prop.tone-soft .main, .stick .prop .part.soft { fill: var(--prop-soft); }
.stick .prop.tone-dark .main, .stick .prop .part.dark { fill: var(--prop-dark); }
.stick .prop.tone-accent .main { fill: var(--pink); }
.stick .prop .part.none { fill: var(--bg); }
.stick .prop .part.line { fill: none; stroke: var(--prop-dark); stroke-width: 1.2; }
.stick .prop.link { --w: 2.5px; fill: none; stroke: var(--prop-dark); stroke-width: var(--w); stroke-linecap: round; }
.stick .prop-band.link { --w: 3.2px; stroke: var(--pink); }
.stick .prop.link.loop { fill: var(--prop-dark); stroke: none; stroke-width: 1px; stroke-linejoin: round; }   /* a band round the limbs: one solid shape, filled, a thin edge where the tone is light */
.stick .prop-band.link.loop { fill: var(--pink); }
.stick .prop.link.loop.tone-plain { fill: var(--prop-fill); stroke: var(--prop-line); }
.stick .prop.link.loop.tone-soft { fill: var(--prop-soft); stroke: var(--prop-line); }
.stick .prop.link.loop.tone-dark { fill: var(--prop-dark); stroke: none; }
.stick .prop.link.loop.tone-accent { fill: var(--pink); stroke: none; }
.stick .prop.coloured.link.loop { fill: var(--tone); stroke: var(--tone-dark); }
.stick .prop-stick.link { --w: 3.5px; }
.stick .prop-line.link { --w: 1.5px; stroke: var(--prop-line); }
/* a band, strap, stick or line given one of the four takes it, as the muscle figure draws it; in the plain or the
   soft, as light as the tile, it has an edge in the warm line under it (props.js adds it); a line's own plain is that line */
.stick .prop.link.tone-plain { stroke: var(--prop-fill); }
.stick .prop.link.tone-soft { stroke: var(--prop-soft); }
.stick .prop.link.tone-dark { stroke: var(--prop-dark); }
.stick .prop.link.tone-accent { stroke: var(--pink); }
.stick .prop-line.link.tone-plain { stroke: var(--prop-line); }
.stick .prop.link.edge { stroke: var(--prop-line); stroke-width: calc(var(--w) + 1.4px); }
/* a named colour (red, blue, wood …) is the equipment's own, the same on any page: props.js writes its
   three shades on the prop, and each part takes one, as with the four; a band or stick in one has an
   edge in the darker shade drawn under it, so a white strap shows on cream and a black one in the studio */
.stick .prop.coloured .part { fill: var(--tone); stroke: var(--tone-dark); }
.stick .prop.coloured .part.dark { fill: var(--tone-dark); }
.stick .prop.coloured .part.soft { fill: var(--tone-soft); }
.stick .prop.coloured .part.line { fill: none; stroke: var(--tone-dark); }
.stick .prop.coloured .part.none { fill: var(--bg); }
.stick .prop.coloured.link { stroke: var(--tone); }
.stick .prop.coloured.link.edge { stroke: var(--tone-dark); }
.stick .prop-text { font: 700 8px var(--font-body); fill: var(--prop-dark); }
.fig-second { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 6px 10px 2px; }
.fig-second svg { width: 100%; max-width: 460px; height: auto; max-height: 190px; aspect-ratio: auto; display: block; margin: 0 auto; }
.item .txt { min-width: 0; }
.item .name { font: 400 1.2rem/1.15 var(--font-display); display: block; }
.item .name .badge { vertical-align: middle; margin-left: 6px; background: var(--tangerine); }
.item .tier { float: right; margin: 2px 0 0 8px; font: 900 .72rem/1 var(--font-body); letter-spacing: .02em; padding: 4px 8px; border-radius: 999px; border: 2px solid var(--grape); background: var(--lime); color: var(--grape); }
.item .tier.pro { background: var(--grape); color: #fff; }
.care-panel.welcome { background: var(--lime); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--pink); font: inherit; font-weight: 900; text-decoration: underline; cursor: pointer; }
.item .muscles { margin: 2px 0 0; font-size: .82rem; font-weight: 600; color: var(--muted); display: block; }
.item::after { content: '›'; font: 900 1.5rem/1 var(--font-body); color: var(--grape); padding-right: 4px; }

/* ---- programmes and plans ---- */
.plans-home h2 { margin: 14px 0 4px; }
.plans-home h2.gap { margin-top: 18px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 8px 0 0; }
.plan { display: grid; gap: 4px; padding: 12px 14px; background: var(--cream); border: 2px solid var(--line); border-radius: var(--r); color: var(--grape); text-decoration: none; }
.plan:active { border-color: var(--grape); }
.plan .name { font: 400 1.15rem/1.15 var(--font-display); }
.plan .for { font-size: .84rem; font-weight: 600; color: var(--muted); }
.plan .n { font-size: .78rem; font-weight: 700; }
.plan.new { background: var(--surface); border-style: dashed; }
.plan-head .muted { margin: 2px 0 0; font-weight: 700; }
.plan-head #plan-start { margin-top: 10px; }
/* before the first start: the two notes and their ticks */
.consent-part h3 { font: 900 1rem/1.3 var(--font-body); margin: 8px 0 2px; }
.consent-part p { margin: 0 0 6px; font-size: .92rem; color: var(--muted); }
.consent-part p b { color: var(--ink); }
label.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; margin: 10px 0 0; font-weight: 700; font-size: .92rem; cursor: pointer; }
label.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--grape); }
#consent .tiny a { color: var(--pink); }
#consent .row.end { margin-top: 14px; }
/* the foot: the disclaimer, on every page but the camera's, and the site's pages */
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.foot-links a { color: var(--grape); font-weight: 800; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-links .linkbtn { color: var(--muted); font-weight: 800; font-size: inherit; }
.foot { max-width: 720px; margin: 24px auto 0; padding: 12px 16px 24px; border-top: 1px solid var(--line, #e6e3dc); }
.foot .tiny { color: var(--muted); }
body.at-live .foot, body.running .foot { display: none; }
/* the camera's veil: can you hear the coach? */
.veil .hear { display: grid; gap: 8px; justify-items: center; margin-top: 6px; }
.veil .hear .row { justify-content: center; }
.veil .hear .btn.link { color: #fff; background: transparent; border-color: rgba(255,255,255,.55); }
.plan-items { list-style: none; margin: 12px 0 0; padding: 0; border-top: 2px solid var(--grape); }
.plan-item { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 2px solid var(--line); }
.plan-item .fig { width: 64px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--cream); border-radius: 10px; overflow: hidden; }
.plan-item .fig svg { width: 60px; height: 40px; max-width: none; margin: 0; overflow: visible; }
.plan-item .fig .lbl { display: none; }
.plan-item .txt { min-width: 0; display: grid; gap: 2px; }
.plan-item .name { font: 400 1.15rem/1.15 var(--font-display); color: inherit; text-decoration: none; }
.plan-item .what { font-size: .84rem; font-weight: 700; color: var(--muted); }
.plan-item .step-note { font-size: .84rem; font-weight: 700; padding: 6px 10px; background: var(--cream); border: 2px solid var(--tangerine); border-radius: 8px; }
.plan-item .step-note:empty { display: none; }
.plan-item .rowtools { grid-column: 1 / -1; justify-content: flex-end; }
.plan-item .adj { grid-column: 1 / -1; display: grid; gap: 8px; padding: 10px; background: var(--cream); border-radius: 10px; }
.plan-item.missing .name { color: var(--bad); }
.plan-item.empty { grid-template-columns: 1fr; }
.btn.small { padding: 8px 12px; font-size: .9rem; }
.add-ex select { flex: 1 1 200px; }
.plan-banner[hidden] { display: none; }
.plan-banner { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin: 0 0 6px; padding: 8px 12px; background: var(--cream); border-radius: 10px; font-size: .86rem; font-weight: 700; }
.plan-banner .step { color: var(--muted); }
.plan-banner .what { flex: 1 1 100%; font-weight: 600; }
.plan-banner a { color: var(--pink); font-weight: 900; text-decoration: none; }
.plan-banner .next { margin-left: auto; }
.rom { display: grid; gap: 4px; margin: 8px 0; }
.rom input[type=range] { width: 100%; max-width: 420px; }
.adj-faults { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 8px; }
.adj-faults label.check { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 700; }
.adj-faults .tiny { flex-basis: 100%; }
.ticks li.off { color: var(--muted); text-decoration: line-through; }
.ticks li.off i { text-decoration: none; font-style: normal; font-weight: 700; }
.sources { margin: 8px 0 0; padding-left: 18px; font-size: .82rem; }
.sources a { color: var(--pink); }
.linkbtn.file input { display: none; }

/* ---- the exercise page: title, the figure, the bubbles, start — one screen ---- */
.ex-top { min-height: calc(100svh - 196px); display: flex; flex-direction: column; gap: 10px; }   /* the title, the figure and the bubbles fit above the start bar */
.ex-top > *, .ex-top > .btn { flex: 0 0 auto; }
.ex-setup { margin: -4px 0 0; color: var(--muted); font-weight: 700; font-size: .92rem; line-height: 1.3; }
.ex-setup b { color: var(--ink); }
.ex-title { font: 400 1.7rem/1.1 var(--font-display); }
.fig-wrap { position: relative; background: var(--cream); border: 2px solid var(--grape); border-radius: var(--r); box-shadow: var(--shadow); min-height: 180px; max-height: 40svh; overflow: hidden; align-self: stretch; flex: 1 1 auto; }
.fig-wrap canvas, .fig-wrap canvas.demo-fig.muscle { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; aspect-ratio: auto; display: block; margin: 0; }
.how-notes { margin: 10px 0 0; color: var(--muted); }   /* one line under the three steps */
/* the sound waves beside the phone: cascading, one after the other */
.how-steps .wave { opacity: .25; animation: wave 1.8s ease-in-out infinite; }
.how-steps .wave:nth-of-type(2) { animation-delay: .3s; }
.how-steps .wave:nth-of-type(3) { animation-delay: .6s; }
@keyframes wave { 0%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .how-steps .wave { animation: none; opacity: 1; } }
.bubbles { display: flex; flex-wrap: wrap; gap: 8px; }
.bubble {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 8px 14px; border-radius: 999px;
  border: 2px solid var(--grape); background: var(--surface); color: var(--grape); font: 900 .95rem/1.1 var(--font-body); cursor: pointer;
}
.bubble .k { font-weight: 700; color: var(--muted); }
/* the band's colour as a filled circle; no band an empty dashed one */
.bubble .swatch { width: 18px; height: 18px; border-radius: 50%; background: var(--band); border: 2px solid rgba(0,0,0,.25); box-sizing: border-box; }
.bubble .swatch[data-band="black"] { border-color: #555; }
.bubble .swatch.none { background: transparent; border: 2px dashed var(--grape); }
.bubble:active { transform: translateY(1px); }
.bubble.na { display: none; }
.custom-load { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--grape); }
.custom-load input { width: 6.5em; min-height: 40px; padding: 6px 10px; border-radius: 12px; border: 2px solid var(--grape); font: 800 1rem var(--font-body); color: var(--ink); background: var(--surface); }
.custom-load[hidden] { display: none; }
.btn.go { min-height: 54px; font-size: 1.1rem; }
/* the start bar: stuck to the foot of the screen on the exercise page, by hand on the left and the camera on the right */
.go-bar { position: sticky; bottom: 0; z-index: 20; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch; margin: 14px -16px 0; padding: 6px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.go-bar #go-note { grid-column: 1 / -1; margin: 0; }
.go-bar .care-ease { grid-column: 1 / -1; margin: 0; }
.care-ease .dot { margin: 0 6px; color: var(--muted); }
.care-ease .out { display: block; font-weight: 700; }
.go-bar .btn.go { height: 54px; min-height: 54px; max-height: 54px; box-sizing: border-box; align-self: stretch; line-height: 1.1; font-size: .98rem; padding: 0 6px; white-space: nowrap; }   /* the two exactly one height */
body.at-live .go-bar { display: none; }
/* the variations combined */
.adv { padding: 8px 14px; }
.adv summary { cursor: pointer; font-weight: 800; color: var(--grape); }
.adv .tiny { margin: 6px 0; }
.adv-list { display: grid; gap: 6px; }
.adv-item { display: flex; gap: 10px; align-items: flex-start; font: 500 .9rem/1.3 var(--font-body); color: var(--muted); }
.adv-item input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--grape); }
.adv-item b { color: var(--ink); }
.adv-custom { display: grid; gap: 4px; margin-top: 10px; font: 700 .85rem var(--font-body); color: var(--muted); }
.adv-custom input { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 2px solid var(--line); border-radius: 10px; font: 500 .95rem var(--font-body); color: var(--ink); background: var(--surface); }
.bubble[data-key="variant"] .v { max-width: 48vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* why the camera did not start, under Start where the person is looking, and what to do about it
   (camtrouble.js); soft for a hint before anything has gone wrong */
.trouble { display: grid; gap: 6px; padding: 12px 14px; border: 2px solid var(--pink); border-radius: var(--r); background: #fff0f6; color: var(--ink); text-align: left; }
.trouble[hidden] { display: none; }
.trouble.soft { border-color: var(--tangerine); background: var(--cream); }
.trouble p { margin: 0; font-size: .92rem; line-height: 1.4; }
.trouble .trouble-title { font: 400 1.15rem/1.2 var(--font-display); }
.trouble-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.trouble-acts .btn { flex: 1 1 auto; min-height: 42px; font-size: .95rem; }
.trouble .trouble-detail { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.trouble-url { flex: 1 1 100%; min-width: 0; min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 2px solid var(--grape); font: 700 .85rem var(--font-body); color: var(--ink); background: var(--surface); }
/* the same on the camera screen while the camera or the engine is on its way, under the picture */
#start-help { margin-top: 10px; }
.ex-more { display: grid; gap: 14px; margin-top: 14px; }
.ticks { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: .92rem; }
/* the session's tile: its parts under the numbers */
.result-part { margin-top: 14px; }
.result-part h3 { margin: 0 0 6px; font: 700 .95rem/1.2 var(--font-body); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
/* the charts: a strip of the hold's form, bars of the range of motion, a line over the sessions before */
.chart { margin: 8px 0 2px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .cap { font-size: .8rem; color: var(--muted); margin: 2px 0 0; }
#charts .legend, #review-lanes .legend, .chart .legend, .hist-charts .legend { display: flex; flex-wrap: wrap; gap: 10px 14px; font-size: .78rem; color: var(--muted); margin-top: 6px; }   /* the key under the charts, each swatch with its words */
#charts .legend i, #review-lanes .legend i, .chart .legend i, .hist-charts .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.seg.h, .legend .h { fill: var(--good); background: var(--good); } .seg.f, .legend .f { fill: var(--tangerine); background: var(--tangerine); }
.seg.o, .legend .o { fill: var(--bad); background: var(--bad); } .seg.u, .legend .u { fill: #b9bec6; background: #b9bec6; } .seg.s, .legend .s { fill: #dfe3e8; background: #dfe3e8; }
.lane .bg { fill: var(--surface-2); } .lane .band { fill: var(--good); opacity: .22; } .lane .room { fill: var(--good); opacity: .09; }
.lane .line { fill: none; stroke: var(--grape); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.lane .held { fill: none; stroke: var(--good); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; opacity: .9; } .lane .faulted { fill: none; stroke: var(--tangerine); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.lane text.rep { fill: var(--good); } .lane text.rep.short { fill: var(--warn); } .lane text.rep.try { fill: #9aa1aa; }
.lane text { font-size: 8px; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; } .lane text.axis { stroke: none; }
.lane .unseen { fill: #b9bec6; } .lane .mark { fill: var(--bad); } .lane .playhead { stroke: var(--pink); stroke-width: 2; }
.legend .ln { background: var(--grape); height: 3px !important; vertical-align: 3px !important; } .legend .bd { background: var(--good); opacity: .35; } .legend .dot { border-radius: 50% !important; } .legend b.rp { color: var(--good); font-weight: 800; }
/* the session again: the film, the cue of the moment, each set's line (tap to go there) */
#review-video { width: 100%; max-height: 70vh; background: #000; border-radius: 12px; display: block; }
.review-cue { min-height: 1.4em; font-weight: 800; margin: 8px 0 4px; }
#review-lanes .chart.lane { cursor: pointer; } #review-lanes .chart.lane.now .cap { color: var(--ink); font-weight: 700; }
#log li[data-t] { cursor: pointer; } #log li[data-t]:hover { color: var(--ink); text-decoration: underline; }
#share-panel { margin-top: 4px; }
.trend .line { fill: none; stroke: var(--grape); stroke-width: 2; stroke-linejoin: round; } .trend .pt { fill: var(--grape); } .trend .now { fill: var(--good); }
.trend .axis { stroke: var(--line); stroke-width: 1; } .chart text { font: 700 9px var(--font-body); fill: var(--muted); }
.trend-note { font-weight: 700; margin: 4px 0 0; }
.ticks li::marker { color: var(--good); }
/* the next-time list: the instruction as the headline, what was seen under it, smaller */
.ticks.next li { margin-bottom: 4px; font-weight: 700; }
#r-sets { margin: 4px 0 8px; }
/* a locked page (the home page for testers): the numbers shown, not changed; the studio's tools kept off it */
body.locked .unlocked-only, body.locked #adjust-panel, body.locked #about .advanced, body.locked #draft-note { display: none; }
body.locked .bubble:disabled { opacity: 1; cursor: default; }

/* ---- the stage: the canvas is the app's picture and the recording's picture ---- */
.stage {
  position: relative; border-radius: var(--r); overflow: hidden; background: #000;
  width: 100%; aspect-ratio: 16/9; max-height: var(--stage-h); margin-inline: auto;
}
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; }
body.full { overflow: hidden; }
body.full .stage {
  position: fixed; inset: 0; z-index: 50; border-radius: 0;
  width: auto !important; max-width: none !important; max-height: none; aspect-ratio: auto !important;
}
.float { position: absolute; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); display: none; justify-content: center; gap: 8px; pointer-events: none; }
body.full .float { display: flex; }
.float .btn { pointer-events: auto; flex: 0 0 auto; min-width: 150px; opacity: .94; box-shadow: 0 6px 24px rgba(0,0,0,.5); }

.veil {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff;
  background: rgba(43,21,70,.88); backdrop-filter: blur(3px); padding: 20px; overflow: auto;
}
.veil[hidden] { display: none; }
.veil-in { display: grid; gap: 10px; justify-items: center; max-width: 34ch; }
.veil .tiny { color: rgba(255,255,255,.75); }
.big { font: 400 1.3rem/1.2 var(--font-display); margin: 0; }
.muted { color: var(--muted); margin: 0; font-size: .92rem; }
.tiny { color: var(--muted); font-size: .8rem; margin: 6px 0 0; }

.log .set { list-style: none; margin: 8px 0 2px -20px; color: var(--ink); font-weight: 700; }

/* ---- readings ---- */
.reads { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.read { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.read.wide { grid-column: 1 / -1; }
.read .v { font-size: 2rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.read .v i { font-size: .95rem; font-style: normal; font-weight: 700; color: var(--muted); margin-left: 2px; }
.read .k { color: var(--muted); font-size: .8rem; margin-top: 6px; display: flex; gap: 8px; align-items: baseline; }
.read .band { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); opacity: .9; }
.read.good { border-color: var(--good); } .read.good .v { color: var(--good); }
.read.bad  { border-color: var(--bad); } .read.bad  .v { color: var(--bad); }
.meter { position: relative; height: 6px; border-radius: 3px; background: var(--cream); margin-top: 10px; overflow: hidden; }
.meter .ok { position: absolute; top: 0; bottom: 0; background: rgba(46,158,91,.35); }
.meter b { position: absolute; top: -3px; width: 3px; height: 12px; border-radius: 2px; background: var(--grape); transform: translateX(-1px); transition: left .08s linear; }
#read-hold .meter .ok { background: rgba(46,158,91,.18); }
#read-hold .meter b { background: var(--good); width: 4px; }

.note {
  margin: 0; padding: 10px 14px; border-radius: 12px; text-align: center; font-weight: 700;
  background: rgba(255,184,48,.25); border: 2px solid var(--tangerine); color: var(--grape);
}
.note[hidden], body.at-home .note, body.at-done .note { display: none; }
.cue { min-height: 1.6em; margin: 0; font-weight: 900; font-size: 1.05rem; text-align: center; }
.faults { min-height: 1.4em; margin: -8px 0 0; text-align: center; font-size: .82rem; font-weight: 900; color: var(--bad); letter-spacing: .01em; }
.faults:empty { display: none; }
.cue.bad { color: var(--bad); }
.cue.fact { font-weight: 700; font-size: .95rem; color: var(--muted); }

/* ---- controls ---- */
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.two { display: grid; grid-template-columns: 1fr 1fr; }
.row.two .btn { min-width: 0; padding-inline: 8px; }
/* a session under way: the red ✕ that ends it now, narrow beside the two */
.row.two.three { grid-template-columns: 1fr 1fr auto; }
.btn.x { flex: 0 0 auto; width: 46px; height: 46px; min-width: 0; min-height: 0; padding: 0; border-radius: 50%; font-size: 1.25rem; line-height: 1; justify-self: center; align-self: center; }
.float .btn.x { min-width: 0; }
/* the camera on its way: nothing read yet, so no readouts under the buttons */
body.starting .reads { display: none; }
.sheet-rows { display: grid; gap: 8px; margin-bottom: 12px; }
.btn {
  flex: 1 1 auto; min-height: 46px; padding: 0 16px; border-radius: 12px; cursor: pointer;
  background: var(--surface); color: var(--grape); border: 2px solid var(--grape);
  font: 900 1rem var(--font-body); text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
/* the cream is for the plain buttons; a coloured one keeps its colour under the finger (a phone keeps :hover after a
   tap, and white words on cream could not be read) */
.btn:hover:not(:disabled):not(:where(.primary, .stop, .lime)) { background: var(--cream); }   /* :where adds nothing to the weight: the old overrides still win */
.btn.primary:hover:not(:disabled), .btn.stop:hover:not(:disabled), .btn.lime:hover:not(:disabled) { filter: brightness(1.15); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--grape); border-color: var(--grape); color: #fff; }
.btn.stop { background: var(--pink); border-color: var(--pink); color: #fff; }
.btn[aria-pressed="true"] { background: var(--lime); }
a.btn.link { }

.panel { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 14px; }
.panel.cream { background: var(--cream); border-color: var(--cream); }
.panel p { margin: 0 0 8px; font-size: .92rem; }
.panel.how p:last-child { margin-bottom: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.grid label { display: grid; gap: 4px; font-size: .8rem; color: var(--muted); font-weight: 700; }
.grid input, .grid select, textarea {
  background: var(--surface); color: var(--ink); border: 2px solid var(--line); border-radius: 10px;
  padding: 9px 10px; font: 700 1rem var(--font-body); min-height: 40px;
}
textarea { width: 100%; resize: vertical; }
.log { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: .88rem; display: grid; gap: 3px; max-height: 240px; overflow: auto; }
.log b { color: var(--ink); font-variant-numeric: tabular-nums; }
.advanced { margin-top: 10px; }
.advanced summary { cursor: pointer; font-weight: 900; color: var(--muted); }
.setup { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); font-size: .92rem; }
.setup li::marker { color: var(--grape); font-weight: 900; }
.setup b { color: var(--ink); }
.how #ex-more-words p { margin-top: 8px; }

/* ---- how it felt ---- */
.feel { display: grid; gap: 10px; }
.feel-row { display: grid; gap: 6px; }
.feel-k { font-size: .8rem; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg .btn { flex: 1 1 auto; min-height: 40px; font-size: .9rem; }

@media (max-width: 420px) { .read .v { font-size: 1.6rem; } .row:not(.two):not(.end) > .btn { flex-basis: 100%; } .seg .btn { flex-basis: auto; } }

/* ---- the Review page keeps its dark workbench ---- */
body.review {
  --bg: #0d1117; --surface: #161b22; --surface-2: #1d2430; --line: #263040; --ink: #e8edf4; --muted: #8b97a8;
  --good: #35d07f; --warn: #ffb545; --bad: #ff5c6c; --accent: #5aa9ff; --grape: #e8edf4; --cream: #1d2430;
  --fig-skin: #46295f; --fig-line: #7658a0; --fig-muscle: #55367a; --fig-far: #38215a; --fig-farline: #4d3178; --fig-floor: rgba(255,255,255,.05);
  --prop-fill: #2b3546; --prop-line: #5d6b80; --prop-dark: #9aa6b8; --prop-soft: #354156;
  --shadow: none; color-scheme: dark;
}
body.review main, body.review .bar { max-width: 1240px; }
body.review .bar { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 22px 0 12px; position: relative; }
body.review .bar::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px; border-radius: 0 0 6px 6px;
  background: linear-gradient(to right, var(--tangerine) 0 33%, var(--lime) 33% 66%, var(--pink) 66%); }
body.review .wordmark { color: var(--ink); }
body.review .wordmark .sub { color: var(--muted); font: 600 .85rem var(--font-body); margin-left: 4px; }
body.review .pick { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font: 700 .88rem var(--font-body); min-height: 34px; }
body.review .btn { border-width: 1px; border-color: var(--line); color: var(--ink); background: var(--surface); }
body.review .btn.primary { background: var(--accent); border-color: var(--accent); color: #06121f; }
body.review .panel, body.review .read { border-width: 1px; }
body.review .grid input, body.review .grid select { background: #0b0f16; border-width: 1px; }
/* a select's list is drawn by the system, which keeps its own white unless told: the dark page's options say their colours outright */
body.review select { background-color: #0b0f16; color: var(--ink); }
body.review option, body.review optgroup { background-color: #161b22; color: #e8edf4; }
/* the cue said at the playhead, under the picture */
#stage-cue { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; min-height: 1.6em; padding: 4px 2px 0; font-size: .92rem; }
#stage-cue .said { font-weight: 800; color: var(--ink); }
#stage-cue .said.bad { color: var(--bad); }
#stage-cue .faults { font-size: .82rem; font-weight: 700; color: var(--bad); }
/* the graph's readout under the pointer */
.lanes-tip { position: fixed; z-index: 50; pointer-events: none; max-width: 300px; background: #0b0f16; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: 600 .78rem/1.35 var(--font-body); box-shadow: 0 4px 16px rgba(0,0,0,.5); }
.lanes-tip b { color: var(--ink); } .lanes-tip .bad { color: var(--bad); } .lanes-tip .good { color: var(--good); } .lanes-tip .dim { color: var(--muted); }
.tabs { display: flex; gap: 6px; }
.tab { background: var(--surface); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font: 700 .85rem var(--font-body); cursor: pointer; }
.tab[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }
a.chip { text-decoration: none; }
.review-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 900px) { .review-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } }
.side-col { display: grid; gap: 14px; min-width: 0; align-content: start; }
.stage.small { max-height: 48vh; }
.stage-col { display: grid; gap: 14px; min-width: 0; }
.lanes-panel .log { max-height: 160px; }
.stage.small video { opacity: 1; object-fit: contain; }
.stage.small canvas { pointer-events: none; }
.btn.file { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; }
.btn.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.numbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.numbers label { display: grid; gap: 2px; font-size: .74rem; line-height: 1.2; color: var(--muted); }
.numbers input { width: 100%; box-sizing: border-box; font: 700 .92rem var(--font-body); padding: 5px 7px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink); }
.tracked { width: 100%; border-collapse: collapse; font-size: .84rem; margin: 4px 0 8px; }
.tracked th { text-align: left; font-weight: 800; padding: 4px 8px 4px 0; white-space: nowrap; color: var(--ink); vertical-align: top; }
.tracked td { padding: 4px 8px 4px 0; color: var(--muted); vertical-align: top; }
.tracked td.v { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.tracked tr.in td.v { color: var(--good); }
.tracked tr.out td.v, .tracked tr.out td b { color: var(--bad); }
.tracked tr + tr { border-top: 1px solid var(--line); }
.sliders label span { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .8rem; }
.sliders label span b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sliders input[type=range] { width: 100%; accent-color: var(--accent); }
#lanes { width: 100%; display: block; border-radius: 12px; background: #0b0f16; cursor: crosshair; }
.takes { margin: 10px 0; padding-left: 20px; color: var(--muted); font-size: .9rem; display: grid; gap: 4px; }
.takes b { color: var(--ink); }
.tiny-btn { min-height: 26px; padding: 0 10px; font-size: .75rem; flex: 0 0 auto; margin-left: 8px; }
.verdicts { width: 100%; border-collapse: collapse; font-size: .9rem; }
.verdicts th, .verdicts td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--line); }
.verdicts th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.verdicts .ok { color: var(--good); font-weight: 700; } .verdicts .no { color: var(--bad); font-weight: 700; }
.edit-fig { width: 100%; aspect-ratio: 4 / 3; background: #0b0f16; border-radius: 12px; touch-action: none; display: block; }
.demo-fig { width: 100%; max-width: 460px; aspect-ratio: 4 / 3; height: auto; display: block; margin: 0 auto; }
.demo-fig.muscle { aspect-ratio: 16 / 9; border-radius: 12px; }
body.review .demo-fig.muscle { background: #0b0f16; }
.seg .btn[aria-pressed="true"] { border-color: var(--accent); }
#anim-json { width: 100%; background: #0b0f16; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 8px; }
body.review .panel h2 .tiny { font-weight: 500; margin-left: 8px; }
.reps { margin: 10px 0 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.reps .rep, .reps .miss, .reps .setup { background: #0b0f16; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-size: .9rem; }
.reps .rep.not { border-style: dashed; }
.reps .rep.focus { border-color: var(--accent); }
.reps .rep-head b { color: var(--ink); }
.reps .setup .rep-head b { color: var(--muted); }
.reps ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); display: grid; gap: 3px; }
.reps ul b { color: var(--bad); }
.reps .rep-before { color: var(--muted); margin-top: 4px; }
.reps .rep-before b { color: var(--warn); }
.reps .clean { color: var(--good); font-weight: 700; margin-top: 4px; }
.reps .said { color: var(--ink); }
.reps .rep-why { color: var(--muted); margin-top: 4px; font-size: .84rem; line-height: 1.4; }
.reps .miss { border-style: dotted; }
.reps .miss .rep-head b { color: var(--warn); }
.reps .setup { cursor: default; background: transparent; }

/* ---- the builder ---- */
.build-form { display: grid; gap: 14px; margin: 14px 0; }
.build-sec h2 { margin-bottom: 6px; }
.build-form .grid label.wide { grid-column: 1 / -1; }
.build-form .grid label, .build-form .grid label > span, .build-form .grid input, .build-form .grid select { min-width: 0; }
.build-form .grid label > span { overflow-wrap: anywhere; line-height: 1.25; }
.build-form .grid textarea { width: 100%; min-height: 60px; font: 700 .95rem var(--font-body); }
.build-form .grid.tight { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.build-form label.check { display: flex; align-items: center; gap: 8px; align-self: end; min-height: 40px; }
.build-form label.check input { width: 18px; height: 18px; }
.rowbox { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 8px 0; }
.rowhead { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: .9rem; }
.rowhead .muted { flex: 1 1 auto; }
.rowtools { margin-left: auto; display: inline-flex; gap: 4px; }
.problems { margin: 0; padding-left: 20px; font-size: .88rem; display: grid; gap: 3px; }
.problems .error { color: var(--bad); }
.problems .warn { color: var(--warn); }
.problems .ok { color: var(--good); }
.problems b { font-weight: 700; margin-right: 4px; }
.problems li.goes { cursor: pointer; }
.problems li.goes:hover b, .problems li.goes:focus-visible b { text-decoration: underline; }
/* a problem, where it is on the form: an error outlined, a warning only worded; a closed section says what is inside */
.build-form .bad-at { outline: 2px solid var(--bad); outline-offset: 3px; border-radius: 8px; }
.build-form .at-msg { display: block; flex-basis: 100%; grid-column: 1 / -1; font-size: .78rem; font-weight: 700; font-style: normal; line-height: 1.3; }
.build-form .at-msg.bad { color: var(--bad); }
.build-form .at-msg.warn { color: var(--warn); }
.build-form details.has-bad > summary::after { content: ' · something to fix inside'; color: var(--bad); font-weight: 700; }
.build-form details.has-warn > summary::after { content: ' · something to look at inside'; color: var(--warn); font-weight: 700; }
.build-form .flash { animation: flash-at 1.6s ease-out; }
@keyframes flash-at { 0%, 35% { box-shadow: 0 0 0 6px rgba(224,36,94,.25); } 100% { box-shadow: 0 0 0 6px rgba(224,36,94,0); } }
body.review textarea { width: 100%; background: #0b0f16; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: 500 .85rem ui-monospace, SFMono-Regular, Menlo, monospace; }
body.review code { font: 500 .85em ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }

/* ---- the builder in steps ---- */
.build-start { display: grid; gap: 10px; margin: 10px 0 14px; }
.pose-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pose-pick button { display: grid; gap: 4px; justify-items: center; padding: 8px 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: #0b0f16; color: var(--ink); cursor: pointer; font: 700 .8rem var(--font-body); }
.pose-pick button:hover, .pose-pick button:focus-visible { border-color: var(--accent); }
.pose-pick svg { width: 100%; height: 64px; }
.pose-pick svg .ink { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.pose-pick svg .floor { stroke: var(--line); stroke-width: 3; }
.step { counter-increment: step; }
.step h2::before { content: counter(step) " · "; color: var(--muted); }
.build-form { counter-reset: step; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chips .btn { min-height: 34px; font-size: .82rem; padding: 4px 10px; }
.chips .btn[aria-pressed="true"] { border-color: var(--accent); background: rgba(90,169,255,.12); }
.measure-fig { width: 100%; aspect-ratio: 16 / 7; background: #0b0f16; border-radius: 12px; touch-action: none; display: block; cursor: crosshair; }
.mcard { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 8px 0; display: grid; gap: 8px; }
/* the card's body as rows of sentences, a labelled row each: what is measured, the correct position, the room to stay in
   position, the start position, the faults and their words, everything else. The label sits at the left of its row where
   the screen is wide enough, above it where it is not; a column that can shrink, so a long sentence wraps inside the card */
.mcard .mbody { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.mcard .mcell { display: grid; gap: 4px 12px; align-items: baseline; min-width: 0; grid-template-columns: minmax(0, 1fr); padding: 6px 0 0; border-top: 1px solid var(--line); }
.mcard .mcell:first-child { border-top: 0; padding-top: 0; }
.mcard .mcell > *:not(.mlab) { grid-column: 2; min-width: 0; }
.mcard .mlab { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; grid-column: 1; }
.start-block { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 8px 0; display: grid; gap: 8px; }
.start-block h3 { margin: 0; font-size: 1rem; }
@media (min-width: 760px) {
  .mcard .mcell { grid-template-columns: 9.5em minmax(0, 1fr); }
  .mcard .mlab { padding-top: .35em; }
}
@media (max-width: 759px) {
  .mcard .mcell > *:not(.mlab) { grid-column: 1; }
}
.mcard .mhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.mcard .mhead b { font-size: 1rem; }
.mcard .mvals { color: var(--muted); font-size: .82rem; }
.mcard .mvals b { color: var(--ink); }
.fault-row { padding: 8px; border-radius: 8px; background: rgba(255,255,255,.03); }
.fault-row label.check { align-self: end; }
.build-form details { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; }
.build-form details summary { cursor: pointer; font-weight: 700; color: var(--muted); font-size: .85rem; }
.build-form details[open] summary { margin-bottom: 8px; }
.auto-note { font-size: .78rem; color: var(--muted); }
/* the builder's measurement cards: slots, and the landmark list a slot opens */
.mcard { position: relative; }
.mcard.editing { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(90,169,255,.25) inset; }
.chips.slots .btn { text-transform: none; }
/* a rule written as a sentence: words, selects and numbers in a row */
.sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: .86rem; color: var(--muted); }
.sentence .w { white-space: nowrap; }
.sentence .inline, .chips.slots .inline { font: 700 .84rem var(--font-body); color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; min-height: 30px; max-width: 100%; }
.sentence .inline.num { width: 5.2em; font-variant-numeric: tabular-nums; }
.sentence .inline.wide { flex: 1 1 160px; min-width: 120px; }
.sentence .inline:not(.num):not(.wide) { max-width: 22em; }
.mhead .inline { font: 700 .8rem var(--font-body); color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; }
.mcard { gap: 6px; padding: 8px 10px; }
.mcard .fault-row { padding: 6px 8px; }
.mcard > .tiny-btn { justify-self: start; }
/* the lanes' legend */
.lane-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 2px; font-size: .76rem; color: var(--muted); }
.lane-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.lane-legend i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }
.lane-legend i.line { height: 0; border-top: 2px dashed; }
.lane-legend i.mark { height: 4px; }
.lm-pop { position: absolute; z-index: 5; left: 8px; right: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.35); display: grid; gap: 6px; }
.lm-title { font-size: .78rem; color: var(--muted); }
.lm-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.lm-grid .btn { min-height: 30px; font-size: .8rem; padding: 3px 9px; }

/* ---- the review page: a rep classified, and the numbers recommended ---- */
.reps .rep-label { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.reps .rep-label .lbl { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-right: 2px; }
/* the verdict chips, in the list and under the video alike: the one chosen is filled and ticked */
.rep-label .btn { padding: 3px 10px; font-size: .8rem; min-height: 0; border-radius: 999px; }
.rep-label .btn[aria-pressed="true"] { border-color: var(--accent); background: rgba(90,169,255,.22); color: var(--ink); }
.rep-label .btn.fault[aria-pressed="true"] { border-color: var(--bad); background: rgba(255,92,108,.24); }
.rep-label .btn.clean[aria-pressed="true"] { border-color: var(--good); background: rgba(53,208,127,.24); }
.rep-label .btn[aria-pressed="true"]::after { content: ' ✓'; font-weight: 900; }
#stage-verdict .rep-label .btn { padding: 5px 12px; font-size: .86rem; border-width: 2px; }
.reps .rep.skipped { opacity: .55; }
.recommend td.move { color: var(--warn); font-weight: 700; } .recommend td.fine { color: var(--good); } .recommend td.overlap { color: var(--bad); font-weight: 700; }
.recommend .btn.tiny-btn { padding: 2px 8px; font-size: .78rem; min-height: 0; }
.recommend .range { color: var(--muted); font-size: .82rem; }
.scroll-x { overflow-x: auto; max-width: 100%; }
#lanes { max-width: 100%; }

/* ---- the studio: one page, the exercise on the left and the recordings on the right ---- */
body.studio main, body.studio .bar { max-width: 1400px; }
body.studio .bar .spacer { flex: 1 1 auto; }
body.studio .bar .note { font-size: .82rem; color: var(--muted); max-width: 32ch; line-height: 1.2; }
body.studio .bar .note.bad { color: var(--bad); }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.studio-grid .col { display: grid; gap: 14px; min-width: 0; align-content: start; }
.studio-grid .col > * { min-width: 0; }
@media (min-width: 900px) {
  /* laid out for a laptop: the exercise's own panel across the top; then the drawing, the video and a narrow column of
     recordings beside them; the lanes straight under the video and the drawing, to the left of the recordings, so the video
     and its lanes are on one screen; then every other panel the whole width, in the order they are used */
  .studio-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr) minmax(250px, 300px); align-items: start; }
  .studio-grid .col { display: contents; }
  .studio-grid #exercise-top { grid-column: 1 / -1; grid-row: 1; }
  .studio-grid #fig-panel { grid-column: 1; grid-row: 2; }
  .studio-grid #stage-wrap { grid-column: 2; grid-row: 2; }
  .studio-grid #lanes-panel { grid-column: 1 / 3; grid-row: 3; }
  .studio-grid #recordings-panel { grid-column: 3; grid-row: 2 / span 2; max-height: 88vh; overflow: auto; }
  .studio-grid > .col > :not(#fig-panel):not(#stage-wrap):not(#recordings-panel):not(#exercise-top):not(#lanes-panel) { grid-column: 1 / -1; }
  #new-panel { order: 4; } #measures-panel { order: 5; } #reps-panel { order: 6; } #suggest-panel { order: 7; }
  #exercise-panel { order: 8; } #numbers-panel { order: 9; } #problems-panel { order: 10; } #file-panel { order: 11; }
  .stage.small { max-height: 38vh; }
  #fig-panel .demo-fig.muscle { max-height: 30vh; width: auto; max-width: 100%; }
  #lanes-panel { padding-top: 8px; padding-bottom: 8px; }
  #stage-wrap .stage-bar { margin-top: 4px; }
}
@media (max-width: 899px) {
  /* the columns dissolve into one, in the owner's order: the drawing, the video and its recordings, the lanes, the reps, then the builder */
  .studio-grid .col { display: contents; }
  #exercise-top { order: 0; } #fig-panel { order: 1; } #stage-wrap { order: 2; } #recordings-panel { order: 3; } #lanes-panel { order: 4; } #reps-panel { order: 5; } #new-panel { order: 6; }
  #measures-panel { order: 7; } #suggest-panel { order: 8; } #exercise-panel { order: 9; } #numbers-panel { order: 10; } #problems-panel { order: 11; } #file-panel { order: 12; }
  .stage.small { max-height: 40vh; }
}
/* the bar: one row on a laptop, every control the same kind of button */
body.studio .bar.studio-bar { flex-wrap: nowrap; gap: 8px; padding: 14px 0 10px; }
body.studio .bar.studio-bar > * { flex: none; }
body.studio .bar.studio-bar .btn { min-height: 32px; padding: 5px 10px; font-size: .82rem; white-space: nowrap; text-decoration: none; }
body.studio .bar.studio-bar .wordmark { font-size: 1.1rem; margin: 0 4px 0 0; white-space: nowrap; }
body.studio .bar.studio-bar .wordmark .sub { font-size: .75rem; }
.build-note-line.note { max-width: 1400px; margin: -2px auto 10px; font-size: .82rem; color: var(--muted); min-height: 1.2em; background: none; border: 0; padding: 0; text-align: left; box-shadow: none; }
.build-note-line.note.bad { color: var(--bad); }
#recordings-panel p.tiny, #lib-panel p.tiny { font-size: .78rem; line-height: 1.4; }
#recordings-panel .row label { font-size: .82rem; }
#points-bar select { width: auto; max-width: 22em; }
body.studio .bar.studio-bar .note { flex: 0 1 auto; min-width: 0; max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.studio .bar.studio-bar .spacer { flex: 1 1 0; }
.move-pick { display: inline-flex; align-items: center; gap: 4px; position: relative; }
.move-pick .pick-find { width: 15em; min-height: 34px; font: inherit; font-size: .86rem; color: var(--ink); background: #0b0f16; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.move-pick .pick { max-width: 14em; min-height: 32px; }
@media (max-width: 1099px) { body.studio .bar.studio-bar { flex-wrap: wrap; } }
#new-panel h2 .tiny-btn { margin-left: 8px; }
.mcard .lane-pick { font-size: .78rem; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
#fig-demo { max-width: none; }
/* the studio's Movement panel as the exercise page draws it: the page's light palette on the page's tile, whatever the workbench's theme */
body.review .user-view {
  --bg: #ffffff; --surface: #ffffff; --cream: #fff3e2; --line: #e9d6bf; --grape: #2b1546; --ink: #2b1546; --muted: #6b5a82; --r: 16px; --shadow: 6px 6px 0 #2b1546;
  --fig-skin: #f6e3c8; --fig-line: #c9a878; --fig-muscle: #e7cda9; --fig-far: #efe0c8; --fig-farline: #dcc6a4; --fig-floor: rgba(0,0,0,.05);
  --prop-fill: #fbe2c0; --prop-line: #c9a878; --prop-dark: #7a6650; --prop-soft: #f3d9b8; color-scheme: light;
}
body.review .fig-wrap.user-view { max-width: 460px; margin: 0 auto 10px; aspect-ratio: 16 / 9; max-height: 34vh; min-height: 150px; }
/* the canvas fills the tile, as on the page (the panel's own rule would size it from its drawing, and a canvas sized
   from its drawing resizes itself every frame) */
#fig-panel .fig-wrap.user-view .demo-fig.muscle { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; aspect-ratio: auto; margin: 0; background: var(--cream); border-radius: 0; }
body.review .fig-wrap.user-view .fig-top { position: absolute; inset: 0; display: grid; place-items: center; padding: 6px; }
body.review .fig-second.user-view { max-width: 460px; margin: 0 auto 10px; }
#fig-user-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 8px; }
#fig-editor { display: grid; gap: 10px; margin-top: 8px; }
.build-form .build-sec { margin: 0; }
.tiny-h { font: 800 .8rem var(--font-body); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 4px; }
.strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .86rem; color: var(--muted); padding: 6px 0 10px; }
.strip:empty { display: none; }
/* a recommendation under the fault row it concerns */
.mcard .rec { font-size: .84rem; line-height: 1.4; padding: 4px 8px 4px 12px; border-left: 3px solid var(--line); color: var(--muted); margin: 2px 0 6px; }
.mcard .rec.fine { border-color: var(--good); } .mcard .rec.move { border-color: var(--warn); } .mcard .rec.overlap { border-color: var(--bad); }
.mcard .rec b { color: var(--ink); } .mcard .rec .btn { margin-left: 6px; }
.mcard .rec details { display: inline; } .mcard .rec summary { display: inline; cursor: pointer; color: var(--accent); }
.mcard .rec ul { margin: 4px 0 0; padding-left: 18px; }
.mcard .meaning { color: var(--muted); font-size: .82rem; line-height: 1.4; margin: 2px 0 6px; }
.mcard .mhead b.what { font-size: .98rem; }
/* a card closes to its head: what it is, its values, and a line of what it holds */
.mcard .fold { padding: 0 7px; min-height: 0; font-size: .8rem; }
.mcard .msum { flex-basis: 100%; color: var(--muted); font-size: .8rem; }
.mcard:not(.collapsed) .msum { display: none; }
.mcard.collapsed { gap: 0; }
.mcard.collapsed.has-bad .msum::after { content: ' · something to fix inside'; color: var(--bad); font-weight: 700; }
.mcard.collapsed.has-warn .msum::after { content: ' · something to look at inside'; color: var(--warn); font-weight: 700; }
/* in a card (one column, the card's width) a select is no wider than its sentence either: on a phone the card is narrower
   than 22em. As specific as the rule it narrows, so the gate editor's own widths below still win */
.mcard .sentence .inline:not(.num, .wide) { max-width: min(22em, 100%); }
/* a number of the file's on a card: its name in the file, beside it */
.numkey { display: inline-flex; align-items: center; gap: 3px; }
.defkey { font: 600 .66rem var(--font-body); color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; padding: 1px 5px; white-space: nowrap; }
.defgo { font-size: .72rem; margin-left: 6px; }
/* a card that could not be drawn: its name, what failed, and its tools */
.mcard.broken { border-color: var(--bad); }
.broken-why { flex-basis: 100%; color: var(--bad); font-size: .82rem; overflow-wrap: anywhere; }
/* every part of a card inside its width, at a desk and on a phone: the card's one column is the card's width, not its
   widest content's, and a long generated title (a sum's, an angle between two lines) wraps beside its fold toggle, the
   values and the tools beside it while they fit and under it when not */
.mcard { grid-template-columns: minmax(0, 1fr); }
.mcard > * { min-width: 0; }
.mcard .mhead > * { min-width: 0; }
.mcard .mhead b.what { flex: 1 1 14em; overflow-wrap: anywhere; line-height: 1.3; }
.mcard .mhead .mvals { white-space: nowrap; }
.mcard .mhead .rowtools { flex: none; }
.mcard .msum { overflow-wrap: anywhere; }
.mcard .sentence .w.free { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
/* a card's words wrap where the card is narrow (a phone): a long phrase never runs past its edge */
.mcard .sentence .w { white-space: normal; min-width: 0; }
.mcard .row .tiny-btn { margin-left: 0; }
/* a measurement's conditions: a sentence a group, a row a condition, a group inside indented under a line */
.build-form .grid > .gate-ed, .build-form .grid > .conf-ed { grid-column: 1 / -1; min-width: 0; }
.gate-ed, .gate-top, .gate-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.gate-group { margin-left: 6px; padding: 2px 0 2px 10px; border-left: 2px solid var(--line); }
.gate-ed .sentence { gap: 4px 6px; }
.gate-ed .sentence .inline.gate-lim { width: 6.5em; }
.gate-ed .sentence .inline.gate-m, .gate-ed .sentence .inline.gate-op { max-width: 100%; min-width: 0; }
.gate-ed .sentence .tiny-btn, .gate-ed .gate-add .tiny-btn { margin-left: 0; }
.gate-ed .gate-add { display: flex; flex-wrap: wrap; gap: 6px; }
.gate-ed .gate-row .gate-m { flex: 1 1 16em; }
.gate-ed .gate-edge { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.gate-ed .gate-head .w:first-child { color: var(--ink); font-weight: 700; }
/* each point's least certainty */
.conf-ed { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; min-width: 0; }
.conf-ed .conf-head { font-size: .8rem; color: var(--muted); font-weight: 700; overflow-wrap: anywhere; }
.conf-ed .conf-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.conf-ed p { margin: 0; }
/* a measure the studio found, not one the exercise has */
.sugg-tag { display: inline-block; font: 800 .68rem var(--font-body); text-transform: uppercase; letter-spacing: .06em; color: #06121f; background: var(--warn); border-radius: 999px; padding: 1px 7px; margin-right: 6px; vertical-align: 1px; }
/* one rep at a time */
.stage-bar .one-rep, .stage-bar .skeleton { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted); }
#rep-wait { font-size: .84rem; color: var(--warn); font-weight: 700; }
#rep-wait:empty { display: none; }
.mcard .fault-row .edge { color: var(--muted); font-size: .82rem; flex-basis: 100%; }
.mcard .fault-row .more-f { display: grid; gap: 6px; flex-basis: 100%; padding: 6px 0 2px 8px; border-left: 2px solid var(--line); }
.mcard .sentence .ghost { color: var(--muted); font-size: .82rem; }
/* the recordings list and the stage bar */
.rec-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.rec-list li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #0b0f16; font-size: .86rem; }
.rec-list li[aria-current="true"] { border-color: var(--accent); }
.rec-list li b { color: var(--ink); } .rec-list li .meta { color: var(--muted); flex: 1 1 auto; }
.rec-list li select { font-size: .8rem; }
.stage-bar { align-items: center; margin: 6px 0 0; }
.stage-bar .tiny { color: var(--muted); }
/* the landmarks under the stage, and a recording that is the phone's own */
#points-bar { margin-top: 2px; }
/* the choice's longest words would set its width: on a phone it shrinks to the bar and shows what it can */
#points-bar label.tiny { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
#points-bar select { font-size: .8rem; min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.rec-list li .live { font: 700 .72rem var(--font-body); color: #06121f; background: var(--accent); border-radius: 999px; padding: 1px 8px; }
/* the takes library's panel, and the verdicts against the judge over the reps */
#lib-panel { margin-top: 10px; } #lib-panel > summary { cursor: pointer; font-weight: 600; } #lib-panel .row { margin: 6px 0; } #lib-other { max-width: 100%; font-size: .8rem; }
.lib-list li .tiny { color: var(--accent); }
.agree { margin: 2px 0 0; } .agree-list { margin: 2px 0 8px; padding-left: 18px; color: var(--muted); } .agree-list li { cursor: pointer; margin: 2px 0; } .agree-list li:hover { color: var(--ink); } .agree-list:empty { display: none; }
#stage-verdict:empty { display: none; }
#stage-verdict .rep-label { margin: 6px 0 0; padding: 0; border: 0; }
#lanes { margin-top: 6px; }
.reps .rec-group { list-style: none; }
.reps .rec-group > .group-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin: 10px 0 6px; color: var(--ink); font-weight: 700; }
.reps .rec-group > .group-head .meta { color: var(--muted); font-weight: 500; font-size: .84rem; }
.reps .rec-group > ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.rep-label .btn.provisional[aria-pressed="true"] { border-style: dashed; opacity: .8; }
/* a fault the coach found in the rep: a dot on its chip, amber when it was in the pause before */
.rep-label .btn.seen::before { content: '●'; color: var(--bad); font-size: .62em; margin-right: 5px; vertical-align: 1px; }
.rep-label .btn.seen.before::before { color: var(--warn); }
.rep-label .saw { flex-basis: 100%; font-size: .8rem; color: var(--muted); }
.rep-label .saw b { color: var(--bad); font-weight: 700; }
/* which side the measurements read, above the cards */
.side-pick { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.side-pick .sentence { margin: 0; } .side-pick p { margin: 6px 0 0; }
.lm-sides .btn[aria-pressed="true"] { border-color: var(--accent); background: rgba(90,169,255,.14); }
.lm-help { font-size: .76rem; color: var(--muted); line-height: 1.35; }
.lm-body { display: grid; gap: 6px; }
/* the landmarks, the bones and the drawing: chips to pick from, a row a bone or a thing drawn */
.lm-block { display: grid; gap: 4px; min-width: 0; padding: 10px 0; border-top: 1px dashed var(--line); }
.lm-block:first-of-type { border-top: 0; padding-top: 0; }
.lm-block > .btn { justify-self: start; margin-left: 0; }
.lm-head { font-size: .8rem; color: var(--muted); font-weight: 700; overflow-wrap: anywhere; line-height: 1.25; }
.lm-note { font-size: .76rem; color: var(--muted); line-height: 1.35; }
.lm-block .chips { margin: 2px 0; }
.lm-block .chips .btn { flex: 0 0 auto; }   /* a landmark is a word, not a bar: one alone on its line keeps its size */
.lm-chip { display: inline-flex; align-items: center; gap: 2px; padding: 1px 4px 1px 10px; border: 1px solid var(--accent); border-radius: 999px; font-size: .82rem; color: var(--ink); background: rgba(90,169,255,.12); }
.lm-chip:has(> .btn:first-child) { padding-left: 2px; }
.lm-chip .btn { margin: 0; padding: 0 6px; min-height: 26px; border: 0; background: transparent; color: var(--muted); }
.lm-chip .btn:hover:not(:disabled) { color: var(--ink); background: transparent; }
.lm-rows { display: grid; gap: 4px; min-width: 0; }
.lm-row { padding: 4px 0; }
.lm-row .tiny-btn, .lm-add .tiny-btn { margin-left: 0; }
.lm-row .w.muted { color: var(--muted); font-size: .78rem; white-space: normal; }
.lm-block .sentence .inline.lm-pick { max-width: 8.5em; }
.lm-block .sentence .inline.m-pick { max-width: 12em; }
.lm-block .sentence .inline.pre-pick { max-width: 13em; }
#derived > details > .grid { padding: 10px 0; border-top: 1px dashed var(--line); }
/* the start position */
#start-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
#start-form .w, #start-form .check span { white-space: normal; min-width: 0; }
#start-form .check { display: flex; gap: 8px; align-items: center; font-weight: 700; }
#start-form .start-rules { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
#start-form .start-rules .check { font-weight: 500; align-items: flex-start; flex: 1 1 280px; }
#start-form .check input { flex: none; margin-top: 3px; }
#start-form input.wide { flex: 1 1 260px; min-width: 200px; }
#start-seen { margin-top: 8px; display: grid; gap: 3px; }
#start-seen:empty { display: none; }
#start-seen .linkbtn { margin-left: 6px; }
.rep-label .btn.other[aria-pressed="true"] { border-color: var(--warn); background: rgba(255,181,69,.18); }
/* measures not yet built */
.suggest-group h3 { font: 800 .9rem var(--font-body); margin: 10px 0 4px; }
.suggest-group h3 .tiny { font-weight: 500; margin-left: 6px; }
.suggest-row { background: #0b0f16; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 6px 0; font-size: .9rem; display: grid; gap: 6px; }
.suggest-row .dots { width: 100%; max-width: 360px; height: 22px; display: block; }
.suggest-row .why { color: var(--muted); font-size: .82rem; }
.suggest-row.existing { border-style: dashed; }
/* the try sheet */
.sheet[hidden] { display: none; }
.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 40; display: grid; place-items: center; padding: 16px; }
.sheet-box { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; max-width: 560px; width: 100%; max-height: 90vh; overflow: auto; display: grid; gap: 6px; }
.sheet-box h2 { margin: 0 0 4px; }
.sheet-box .spacer { flex: 1 1 auto; }
/* the studio's list of equipment and shapes in the drawing */
.prop-list { display: grid; gap: 6px; margin: 6px 0; }
.prop-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-end; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.prop-row.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.prop-row > b { flex-basis: 100%; font-size: .9rem; }
.programs-main { max-width: 860px; margin: 0 auto; padding: 12px 16px 40px; }
.prog-items { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.prog-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 8px; }
.equip-rows { display: grid; gap: 6px; margin: 6px 0; }
.equip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.equip-row > b { flex: 0 0 120px; font-size: .86rem; }
.equip-row input[type=text] { flex: 1 1 160px; min-width: 0; }
.equip-row .check { font-size: .82rem; font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.prop-row label { display: flex; flex-direction: column; gap: 2px; font-size: .78rem; color: var(--muted); }
.prop-row label.check { flex-direction: row; align-items: center; gap: 6px; }
.prop-row input[type=number] { width: 5.5em; }
.prop-row input[type=text] { width: 8em; }
.prop-row .row-acts { margin-left: auto; display: flex; gap: 6px; }
/* a prop's colour: a swatch for each tone, "its own" and the page's four on one line, the named colours on the next;
   each is a radio button, unseen over its swatch, so the arrow keys still step through them */
.prop-row .tones { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.prop-row .tones > span { flex-basis: 100%; font-size: .78rem; color: var(--muted); }
.prop-row label.sw { position: relative; flex-direction: row; align-items: center; gap: 4px; padding: 1px; cursor: pointer; color: var(--ink); }
.prop-row label.sw[data-tone=""] { margin-right: 6px; }
.prop-row .tones-break { flex-basis: 100%; height: 0; }
.prop-row .sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.prop-row .sw i { display: block; width: 17px; height: 17px; border-radius: 50%; background: var(--sw); border: 2px solid var(--sw-edge); }
.prop-row .sw input:checked + i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.prop-row .sw input:focus-visible + i { outline: 2px dashed var(--accent); outline-offset: 4px; }

/* the recordings, narrow: buttons in a wrapping row, the explanations behind the ⓘ */
.info { display: inline-grid; place-items: center; width: 1.15em; height: 1.15em; border-radius: 50%; font: 700 .72rem var(--font-body); color: var(--muted); border: 1px solid var(--line); cursor: help; vertical-align: middle; }
.info:hover, .info:focus { color: var(--ink); border-color: var(--accent); outline: none; }
.rec-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.rec-actions .btn { min-height: 30px; padding: 4px 10px; font-size: .8rem; }
.rec-actions .fps { font-size: .78rem; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.rec-actions .fps input { width: 3.6em; }
#recordings-panel h2 { font-size: 1rem; }
#recordings-panel .rec-list li { font-size: .78rem; padding: 6px 8px; }
#recordings-panel .rec-list li .btn { min-height: 26px; padding: 2px 8px; font-size: .74rem; }
#recordings-panel #lib-other { max-width: 100%; }
#exercise-top { padding: 10px 14px; }
#exercise-top .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 12px; }
#exercise-top .file-id { font-size: .78rem; color: var(--muted); align-self: end; padding-bottom: 8px; }
/* the exercise picker: one box, typed into, its matches listed under it */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }
.move-pick .pick-find { font-weight: 700; padding-right: 22px; background: #0b0f16 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238a96a8'/%3E%3C/svg%3E") no-repeat right 8px center; }
.pick-list { position: absolute; top: calc(100% + 4px); left: 0; z-index: 50; min-width: 100%; max-height: 60vh; overflow: auto; margin: 0; padding: 4px; list-style: none; background: #0f141d; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.pick-list li { padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: .86rem; color: var(--ink); white-space: nowrap; }
.pick-list li[aria-selected="true"], .pick-list li:hover { background: rgba(90,169,255,.16); }
.pick-list li.cur { font-weight: 700; }
.pick-list li mark { background: none; color: var(--accent); }
.pick-list .none { color: var(--muted); cursor: default; }

/* ---- the pages that are not an exercise: tabs under the bar, on the home, history and about screens ---- */
/* the history is a calendar button on the bar; the page itself is #/history */
.topbar #btn-history { margin-left: 0; }
/* the tools: part of the bar on a wide screen; on a phone, a menu under the bar's last button, each tool with its name */
.nav-tools { display: contents; }
.iconbtn .lbl { display: none; }
#btn-menu { display: none; position: relative; }
@media (max-width: 599px) {
  #btn-menu { display: inline-flex; }
  .nav-tools { display: none; position: absolute; right: 16px; top: calc(100% + 6px); z-index: 40; flex-direction: column; gap: 2px; min-width: 210px; padding: 8px; background: var(--surface); border: 2px solid var(--grape); border-radius: var(--r); box-shadow: var(--shadow); }
  .nav-tools.open { display: flex; }
  .nav-tools .iconbtn { width: auto; height: auto; min-height: 44px; border: 0; border-radius: 10px; justify-content: flex-start; gap: 12px; padding: 8px 10px; font: 800 1rem var(--font-body); }
  .nav-tools .iconbtn:active, .nav-tools .iconbtn:hover { background: var(--cream); }
  .nav-tools .iconbtn .lbl { display: inline; order: 2; }
  .nav-tools .iconbtn svg { flex: 0 0 auto; }
  .nav-tools #btn-account .acct-dot { top: 50%; right: 10px; transform: translateY(-50%); }
}
.topbar #btn-history.on, .topbar #btn-review.on, .topbar #btn-settings.on { background: var(--grape); color: var(--surface); }
/* a signed-in customer (a coach's pack or not): Info, Review and Settings are the bar's buttons, on a phone too; no menu,
   no history (Review has it), no account button (the brand is their home) */
body.cust-bar #btn-menu, body.cust-bar #btn-history, body.cust-bar .nav-tools .unlocked-only { display: none; }
@media (max-width: 599px) {
  body.cust-bar .nav-tools { display: contents; }
  body.cust-bar .nav-tools .iconbtn { width: 40px; height: 40px; min-height: 0; padding: 0; border: 2px solid var(--grape); border-radius: 999px; justify-content: center; }
  body.cust-bar .nav-tools .iconbtn .lbl { display: none; }
  body.cust-bar .nav-tools .iconbtn:hover { background: var(--surface); }
  body.cust-bar .nav-tools .iconbtn.on { background: var(--grape); }
}
/* with three buttons on the right, a phone's bar has no room for the page's name: cut to a letter, it says nothing */
@media (max-width: 459px) { body.cust-bar .nav-title, body.at-care .nav-title { display: none; } }   /* the account's pages: their heading says it */
@media (max-width: 459px) { body.cust-bar .topbar { gap: 6px; } body.cust-bar .search { padding-inline: 10px; } }   /* the mark, the search and three buttons on a phone: room for the word Search */
.tab.on { background: var(--grape); color: #fff; }
/* ---- logging a set by hand ---- */
/* the session logged by hand: a block per exercise, a row per set, no numbering; a swipe left deletes a row, a swipe
   right opens its variation; the band as colour taps, or the weight, never both; a tick per set; a timer on a hold's row */
.log-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 6px; }
.log-title .log-right { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.ex-title small.var, .log-title small.var { font: 600 .6em/1.2 var(--font-body); color: var(--muted); }
.log-block { margin-top: 12px; }
.log-mode { border: 2px solid var(--grape); background: var(--surface); color: var(--grape); border-radius: 999px; padding: 2px 10px; font: 800 .8rem var(--font-body); cursor: pointer; }
.log-sets { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
.log-set { position: relative; overflow: hidden; border-radius: 12px; touch-action: pan-y; }
.log-under { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 14px; font: 800 .85rem var(--font-body); color: var(--surface); background: var(--line); border-radius: 12px; }
.log-set.left .log-under { background: var(--pink); } .log-set.right .log-under { background: var(--grape); }
.log-under .l, .log-under .r { opacity: 0; } .log-set.right .log-under .l, .log-set.left .log-under .r { opacity: 1; }
.log-body { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 4px; background: var(--surface); border-radius: 12px; }
.log-set.swiping .log-body { box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.log-field { display: inline-flex; align-items: center; gap: 4px; }
.log-field input { width: 4.4em; padding: 8px 6px; border: 2px solid var(--line); border-radius: 10px; font: 700 1.05rem var(--font-body); color: var(--ink); background: var(--surface); text-align: center; }
.log-field small { font: 700 .78rem var(--font-body); color: var(--muted); }
.log-band { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.log-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(0,0,0,.25); background: var(--band); box-sizing: border-box; flex: 0 0 auto; }
.log-swatch.none { background: transparent; border: 2px dashed var(--grape); }
.log-swatch[data-band="black"] { border-color: #555; }
.log-band-sel { padding: 8px 6px; border: 2px solid var(--line); border-radius: 10px; font: 700 .95rem var(--font-body); color: var(--ink); background: var(--surface); max-width: 9.5em; }
.log-set .log-done { border: 0; background: none; color: var(--grape); font: 800 1.05rem/1 var(--font-body); cursor: pointer; width: 32px; height: 32px; border-radius: 50%; padding: 0; flex: 0 0 auto; }
.log-set .log-done { margin-left: auto; }
.log-band + .log-done, .log-band ~ .log-done, .log-field + .log-done { margin-left: 0; }
.log-set .log-done[aria-pressed="true"] { background: var(--grape); color: var(--surface); }
.log-set.done .log-field input, .log-set.done .log-band { opacity: .5; }
.log-setvar { flex: 0 0 100%; padding: 0 8px 2px; font: 600 .8rem var(--font-body); color: var(--muted); }
.log-block .log-add { width: 36px; height: 36px; font-size: 1.3rem; line-height: 1; margin: 0; }
#log-current input.log-exnote { display: block; width: 100%; box-sizing: border-box; margin: 8px 0 0; padding: 7px 10px; border: 2px solid var(--line); border-radius: 10px; font: 500 .9rem var(--font-body); color: var(--ink); background: var(--surface); }
.hist-session-note { margin: 0 0 6px; }
.log-x { border: 0; background: none; color: var(--muted); font: 700 1.1rem var(--font-body); cursor: pointer; padding: 6px; }
.log-x:hover, .log-x:focus { color: var(--grape); }
.log-day { margin: 10px 0 0; font: 700 .9rem var(--font-body); color: var(--muted); }
.log-day small, .hist-session h2 small, .hist-name small { font: 600 .85em var(--font-body); color: var(--muted); margin-left: 6px; }
/* the timer button by the exercise's name, and the timer itself over the whole screen */
.log-timer-btn { border: 2px solid var(--grape); background: var(--surface); color: var(--grape); border-radius: 999px; padding: 4px 12px; font: 800 .85rem var(--font-body); cursor: pointer; }
.fs-timer { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; background: var(--grape); color: var(--surface); text-align: center; }
.fs-timer[hidden] { display: none; }
.fs-name { margin: 0; font: 800 1.4rem var(--font-head, var(--font-body)); }
.fs-sub { margin: 0; font: 600 1rem var(--font-body); opacity: .8; }
.fs-clock { font: 900 clamp(5rem, 28vw, 9rem)/1 var(--font-body); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.fs-clock.over { color: var(--pink); }
.fs-held { margin: 0; min-height: 1.4em; font: 700 1.1rem var(--font-body); }
.fs-actions { display: flex; gap: 10px; margin-top: 14px; width: 100%; max-width: 420px; }
.fs-actions .btn { flex: 1 1 0; min-height: 56px; font-size: 1.1rem; }
.fs-actions .btn.primary { background: var(--pink); border-color: var(--pink); }
.fs-actions .btn:not(.primary) { background: transparent; color: var(--surface); border-color: var(--surface); }
/* the bar's line while a session is going: what is done so far, a link to its page */
.go-bar #go-session { grid-column: 1 / -1; margin: 0; display: block; color: var(--grape); font-weight: 700; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.go-bar #go-session[hidden] { display: none; }
.log-bar[hidden] { display: none; }
.log-bar { grid-template-columns: 1fr 1fr; }
.log-bar.one { grid-template-columns: 1fr; }
.menu.static { margin-top: 8px; max-height: 50vh; overflow: auto; }
.log-q { display: block; width: 100%; box-sizing: border-box; margin: 6px 0; padding: 8px 12px; border: 2px solid var(--line); border-radius: 10px; font: 600 1rem var(--font-body); color: var(--ink); background: var(--surface); }
.hist-session { margin-top: 12px; }
.hist-session.current { border-color: var(--grape); }
.hist-session.current h2 { color: var(--grape); }
#log-current textarea { width: 100%; box-sizing: border-box; margin: 10px 0 4px; padding: 8px 10px; border: 2px solid var(--line); border-radius: 10px; font: 500 .95rem var(--font-body); }
#log-current .log-block { margin-top: 10px; background: var(--cream); border-color: var(--cream); }
/* behind a row's +: the set's charts and the trend, as the review draws them */
.hist-charts h4 { margin: 10px 0 2px; font: 800 .9rem var(--font-body); color: var(--ink); }
.hist-charts .chart { margin: 4px 0 2px; }
.hist-session h2 { margin-bottom: 2px; }
/* the calendar: a month, seven columns, a day with a session marked and counted */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.cal-head h2 { margin: 0; text-align: center; flex: 1 1 auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-w { text-align: center; font: 800 .72rem var(--font-body); color: var(--muted); padding: 2px 0; }
.cal-d { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 10px; font: 700 .9rem var(--font-body); color: var(--ink); text-decoration: none; }
.cal-d.pad { visibility: hidden; }
.cal-d.has { background: var(--cream); color: var(--grape); }
.cal-d.has i { position: absolute; right: 3px; top: 2px; font: 800 .6rem var(--font-body); color: var(--surface); background: var(--pink); border-radius: 999px; min-width: 14px; height: 14px; line-height: 14px; text-align: center; padding: 0 3px; }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--grape); }
a.cal-d:hover, a.cal-d:focus { background: var(--line); }
#cal-note { margin: 6px 0 0; }
.hist-row { padding: 10px 0; border-top: 1px solid var(--line); }
.hist-row:first-of-type { border-top: 0; }
.hist-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.hist-name { color: var(--ink); text-decoration: none; }
a.hist-name:hover b, a.hist-name:focus b { text-decoration: underline; }
.hist-icon { width: 22px; height: 22px; flex: 0 0 auto; color: var(--grape); }
.hist-icon.off { color: var(--muted); }
.hist-right { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.hist-more { border: 0; background: none; color: var(--grape); font: 900 1.3rem/1 var(--font-body); cursor: pointer; width: 32px; height: 32px; border-radius: 50%; }
.hist-more:hover, .hist-more:focus { background: var(--line); }
.hist-detail { margin: 2px 0 6px; padding: 8px 12px; border-radius: 10px; background: var(--cream, #fbf5ea); }
.hist-sets { margin: 0 0 4px; padding-left: 0; list-style: none; }
.hist-sets li { padding: 2px 0; }
.hist-detail .tiny { margin: 4px 0 0; }
/* the variations as a list under the bubbles */
.menu { display: grid; gap: 4px; margin-top: 8px; padding: 6px; border: 2px solid var(--grape); border-radius: 14px; background: var(--surface); }
.menu[hidden] { display: none; }
.menu-item { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: 500 .9rem/1.3 var(--font-body); cursor: pointer; }
.menu-item b { font-weight: 800; color: var(--grape); }
.menu-item span { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu-item.on { background: var(--line); }
.menu-item.on b::before { content: '✓ '; }
.menu-item:hover, .menu-item:focus { background: var(--line); }
.hist-words { margin: 4px 0; }
.hist-note { margin: 2px 0 4px; white-space: pre-wrap; }

/* ---- the angle the animation is drawn from ---- */
.fig-top svg { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto; }
.variant-words { margin: 2px 0 6px; text-align: center; }
.variant-words b { color: var(--grape); }

/* ---- a laptop or a tablet: the app keeps its phone width in the middle, the bar's contents over it, nothing stretched ---- */
@media (min-width: 900px) {
  .topbar { padding-inline: calc((100% - 728px) / 2); }   /* the bar runs edge to edge; its contents sit over main's 760px */
}
@media (min-width: 700px) {
  .ex-top { min-height: 0; }                                /* no empty room held under the figure: the start bar is in view anyway */
  .search { flex: 0 1 320px; }
}

/* ---- the account layer (account.js): sign in, the account, a coach's customers and packs, the invitation ---- */
.acct-dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--grape); border: 2px solid var(--surface); }
#btn-account { position: relative; }
#btn-account.on { color: inherit; }   /* signed in: the icon keeps the bar's colour; the dot says when something is due */
#screen-care { display: grid; gap: 14px; min-width: 0; }
#screen-care > * { min-width: 0; }
.care-panel { overflow-wrap: anywhere; }
#ca-msg { word-break: break-all; }
.care-panel { background: var(--cream); border: 2px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 10px; }
.care-panel.white { background: var(--surface); }
.care-panel h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.care-panel h2 .tiny { font-weight: 700; }
.care-panel .count { margin-left: auto; font-size: .78rem; background: var(--pink); color: #fff; border-radius: 999px; padding: 2px 9px; }
.care-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--grape); }
.care-list li { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 10px 2px; border-bottom: 2px solid var(--line); }
.care-list li > span:first-child { display: grid; gap: 2px; min-width: 0; }
.care-list li .name { font: 400 1.1rem/1.15 var(--font-display); display: block; }
.care-list li .sub { font-size: .84rem; font-weight: 600; color: var(--muted); display: block; }
.care-list li .flags { font-size: .8rem; font-weight: 800; color: var(--bad); display: block; }
.care-list.dash li .last { font-size: .9rem; font-weight: 700; color: var(--ink); display: block; }
.care-list li a.btn, .care-list li button.btn { white-space: nowrap; }
.care-list li .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.care-form { display: grid; gap: 10px; }
.care-form label { display: grid; gap: 4px; font-weight: 700; font-size: .9rem; }
.care-form input, .care-form select, .care-form textarea { font: 600 1rem var(--font-body); padding: 10px 12px; border: 2px solid var(--grape); border-radius: 12px; background: var(--surface); color: var(--ink); min-width: 0; width: 100%; box-sizing: border-box; }
.care-panel .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.care-panel .row .btn { max-width: 100%; }
.care-form input[type=tel], .care-form input.code { font-size: 1.4rem; letter-spacing: .08em; }
.care-form .check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.care-form .check input { width: 22px; height: 22px; }
.care-form .grid.tight { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }   /* a phone number whole: the pair stacks on a phone */
.care-note { font-size: .9rem; color: var(--muted); font-weight: 600; }
.care-err { color: var(--bad); font-weight: 800; }
.care-ok { color: var(--good); font-weight: 800; }
.care-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0; }
.care-tabs a, .care-tabs button { padding: 7px 12px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--grape); font: 800 .86rem var(--font-body); text-decoration: none; cursor: pointer; }
.care-tabs a.on, .care-tabs button.on { background: var(--grape); color: #fff; border-color: var(--grape); }
.care-week { display: flex; gap: 4px; margin: 4px 0; }
.care-week span { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .72rem; font-weight: 900; color: var(--muted); }
.care-week span.on { background: var(--lime); border-color: var(--grape); color: var(--grape); }
.care-week span.today { border-color: var(--pink); }
.care-reply { background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: .92rem; }
.care-reply .who { font-size: .78rem; font-weight: 800; color: var(--muted); margin-bottom: 2px; }
.care-stat { display: inline-grid; gap: 2px; padding: 10px 14px; margin: 4px 6px 4px 0; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); font: 400 1.4rem/1 var(--font-display); }
.care-stat small { font: 800 .72rem var(--font-body); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.care-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.care-choice label { border: 2px solid var(--grape); border-radius: 14px; padding: 12px; background: var(--surface); display: grid; gap: 4px; cursor: pointer; font-weight: 700; }
.care-choice label:has(input:checked) { background: var(--lime); }
.care-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.care-choice .sub { font-size: .82rem; font-weight: 600; color: var(--muted); }
/* the plan cards, as the pricing page has them */
.care-plans { display: grid; gap: 12px; }
.care-plan { border: 2px solid var(--grape); border-radius: 14px; padding: 14px; background: var(--surface); display: grid; gap: 8px; }
.care-plan.pro { background: var(--grape); color: #fff; }
.care-plan .price { font: 400 1.8rem/1 var(--font-display); }
.care-plan .price small { font: 800 .9rem var(--font-body); color: var(--muted); }
.care-plan.pro .price small { color: rgba(255,255,255,.75); }
.care-plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: .9rem; font-weight: 600; }
.care-plan li::before { content: '✓ '; color: var(--good); font-weight: 900; }
.care-plan.pro li::before { color: var(--lime); }
.care-plan .btn.lime { background: var(--lime); color: var(--grape); border-color: var(--lime); }
/* the pack builder */
.pack-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pack-items li { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--surface); }
.pack-items li .pic { width: 56px; height: 56px; background: var(--cream); border-radius: 10px; padding: 4px; }
.pack-items li .pic svg { width: 100%; height: 100%; }
.pack-items li .pic .lbl { display: none; }
.pack-items li .nums { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: .82rem; font-weight: 700; color: var(--muted); }
.pack-items li .nums label.n { display: inline-flex; gap: 6px; align-items: center; font: inherit; color: inherit; white-space: nowrap; }
.pack-items li .nums input { width: 54px; padding: 4px 6px; font: 700 .9rem var(--font-body); border: 2px solid var(--line); border-radius: 8px; text-align: center; }
.pack-items li .acts { display: grid; gap: 4px; }
.pack-items li .acts button { min-height: 28px; padding: 2px 8px; font-size: .78rem; }
.pack-pick li { grid-template-columns: 52px 1fr auto; }
.pack-pick li .pic { width: 52px; height: 44px; background: var(--cream); border-radius: 10px; padding: 3px; display: block; }
.pack-pick li .pic svg { width: 100%; height: 100%; }
.pack-pick li .pic .lbl { display: none; }
/* a list to pick one from: a radio row per customer, the row lit when picked */
.care-list.pick li { grid-template-columns: 1fr auto; }
.care-list.pick .row-pick { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; cursor: pointer; }
.care-list.pick .row-pick > span { display: grid; gap: 2px; min-width: 0; }
.care-list.pick .row-pick input { width: 20px; height: 20px; accent-color: var(--grape); }
.care-list.pick li:has(input:checked) { background: var(--cream); }
.btn.wa { background: #1f8f4e; border-color: #1f8f4e; color: #fff; }
.btn.wa:disabled { background: var(--line); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.care-save { background: var(--lime); }
/* the invitation's landing: the coach's name, the pack, how it works */
.invite-hero { display: grid; gap: 8px; }
.invite-hero h1 { font: 400 1.7rem/1.15 var(--font-display); }
.invite-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.invite-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.invite-steps .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 400 1rem var(--font-display); background: var(--tangerine); }
.invite-steps li:nth-child(2) .n { background: var(--lime); } .invite-steps li:nth-child(3) .n { background: var(--pink); color: #fff; }
.invite-steps b { display: block; }
.invite-steps span { font-size: .9rem; color: var(--muted); font-weight: 600; }
.care-demo { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.care-demo .ex { border: 2px solid var(--line); border-radius: 12px; background: var(--surface); padding: 6px; display: grid; gap: 4px; justify-items: center; font: 800 .78rem/1.2 var(--font-body); text-align: center; }
.care-demo .ex .pic { width: 72px; height: 64px; }
.care-demo .ex .pic svg { width: 100%; height: 100%; }
.care-demo .ex .pic .lbl { display: none; }
.care-demo .ex .nums { font-weight: 600; color: var(--muted); }
/* the sheet: something is wrong, from any screen */
.care-sheet .modal-in { max-width: 460px; }
/* the home's panel: today's plan, the trial, the sign-in */
#acct-home .care-panel { margin-bottom: 14px; }
.today-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.today-list li { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.today-list li.done { border-color: var(--lime); }
.today-list .name { font-weight: 800; }
.today-list .sub { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); }
/* the account's bars (a span, and the weeks' row): not the done screen's chart, which is .chart.trend */
span.trend, .trend.weeks { display: flex; gap: 3px; align-items: flex-end; height: 28px; border-bottom: 2px solid var(--line); padding-bottom: 1px; }
span.trend i, .trend.weeks i { display: block; width: 8px; background: var(--grape); border-radius: 2px 2px 0 0; min-height: 3px; }
.trend.weeks { height: 48px; gap: 6px; }
.trend.weeks i { width: 18px; background: var(--lime); border: 2px solid var(--grape); border-bottom: 0; box-sizing: border-box; }
span.trend i.pain { background: var(--bad); }
@media (min-width: 700px) { .care-plans { grid-template-columns: 1fr 1fr; } .care-choice { grid-template-columns: 1fr 1fr 1fr; } }

/* a customer with a pack from their coach: the pack on the home, not the rest of the library */
body.plan-only #plans-home, body.plan-only #picker, body.plan-only #screen-home > .lede, body.plan-only #no-match { display: none; }
.badge.free { background: var(--lime); color: var(--grape); font: 800 .78rem/1 var(--font-body, inherit); padding: 4px 9px; border-radius: 999px; vertical-align: middle; margin-left: 6px; white-space: nowrap; }
/* the programmes under the coach's own packs: one line, open to see them */
.care-more { margin-top: 12px; border-top: 2px solid var(--line); padding-top: 10px; }
.care-more > summary { cursor: pointer; font: 400 1.1rem/1.3 var(--font-display); list-style-position: outside; }
.care-more[open] > summary { margin-bottom: 6px; }

/* ---- a customer with a coach's pack: the pack due, Start now, the history (Info, Review, Settings on the bar) ---- */
.pack-due h2 { margin: 2px 0 2px; }
.due-when { margin: 0; font: 800 .8rem var(--font-body, inherit); letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.due-when.now { color: var(--pink); }
.btn.big { width: 100%; min-height: 56px; font-size: 1.15rem; }
.pack-list { list-style: none; margin: 12px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pack-list li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; }
.pack-list li.done { border-color: var(--lime); }
.pack-list .pic { flex: none; width: 64px; height: 44px; display: grid; place-items: center; }
.pack-list .pic svg { max-width: 100%; max-height: 100%; }
.pack-list .name { display: block; font: 400 1.05rem/1.2 var(--font-display); color: var(--grape); }
.pack-list .sub { display: block; font-size: .85rem; color: var(--muted); font-weight: 700; }
.pack-list .tick { color: #3c8a00; }
.hist-day { margin: 14px 0 4px; font: 800 .78rem var(--font-body, inherit); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.care-list.hist li { align-items: center; }
.care-list.hist .when { margin-left: auto; font-size: .8rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
/* settings: rows that open the page they name */
.care-list.set li { padding: 0; }
.set-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 2px; background: none; border: 0; text-align: left; font: inherit; color: inherit; text-decoration: none; cursor: pointer; }
.set-row .name { display: block; font-weight: 800; color: var(--grape); }
.set-row .sub { display: block; font-size: .85rem; color: var(--muted); }
.set-row .chev { margin-left: auto; font-size: 1.5rem; color: var(--muted); }
.set-row.stop .name { color: #c2185b; }
/* review: the month's days with a session, and a chart an exercise */
.care-cal .cal-d { cursor: default; }
.care-cal .cal-d.on { background: var(--lime); color: var(--grape); font-weight: 900; }
.cal-x { aspect-ratio: 1; }
.cal-head b { font: 400 1.15rem var(--font-display); flex: 1 1 auto; min-width: 0; text-align: center; }
#rv-cal { overflow: hidden; }
.care-cal { min-width: 0; }
.cal-nav { flex: none; box-sizing: border-box; width: 44px; height: 44px; padding: 0; border: 2px solid var(--grape); border-radius: 999px; background: var(--surface); color: var(--grape); font-size: 1.4rem; line-height: 1; cursor: pointer; }
button.cal-d { border: 0; padding: 0; font: inherit; cursor: pointer; }
.care-cal button.cal-d.on:hover, .care-cal button.cal-d.on:focus-visible { box-shadow: inset 0 0 0 2px var(--grape); }
/* review: the workouts, a day at a time, each exercise a row with its band or weight and a + for the sets and faults */
.wk-day { margin-top: 10px; }
.wk-day h3 { margin: 0 0 6px; font: 800 .78rem var(--font-body); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.wk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wk { padding: 6px 4px 6px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); }
.wk-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wk-name { font: 400 1.02rem/1.2 var(--font-display); color: var(--grape); }
.wk-sum { margin-left: auto; font-size: .88rem; font-weight: 800; color: var(--ink); white-space: nowrap; }
.wk-detail { padding: 4px 8px 6px 0; font-size: .9rem; }
.wk-faults { margin: 4px 0; }
.int-chip { display: inline-flex; align-items: center; padding: 2px 8px 2px 4px; border-radius: 999px; background: var(--cream); font-size: .78rem; font-weight: 800; color: var(--grape); white-space: nowrap; }
.int-chip.kg, .int-chip.base { padding-left: 8px; }
.int-chip.base { background: transparent; border: 1.5px solid var(--line); color: var(--muted); }
.wk-sets { margin: 6px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wk-sets b { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; margin-right: 2px; }
.pill { display: inline-block; min-width: 30px; padding: 2px 9px; border-radius: 999px; border: 2px solid var(--grape); background: var(--surface); color: var(--grape); font-weight: 900; font-size: .88rem; text-align: center; }
.wk-day.focus h3 { color: var(--grape); }
.wk-day.focus .wk { border-color: var(--grape); }
/* review: History or Analysis, under the calendar */
.rv-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 12px; border: 2px solid var(--grape); border-radius: 999px; overflow: hidden; background: var(--surface); }
.rv-tab { border: 0; background: none; padding: 10px 6px; font: 800 .95rem var(--font-body); color: var(--grape); cursor: pointer; }
.rv-tab.on { background: var(--grape); color: var(--surface); }
/* the pack's home: a day of the history opens Review on it */
.hist-link { display: flex; align-items: center; gap: 10px; width: 100%; color: inherit; text-decoration: none; }
.hist-link .chev { font-size: 1.4rem; color: var(--muted); }
/* the account's Settings page: the app's own fields, lent from their sheet */
#set-prefs .prefs-grid { display: block; margin: 0; border-top: 2px solid var(--grape); }
#set-prefs .prefs-grid label { display: grid; gap: 6px; padding: 10px 2px; border-bottom: 2px solid var(--line); font: 400 1.1rem/1.15 var(--font-display); color: var(--ink); }
#set-prefs + .care-list.set { border-top: 0; }
/* a date in a form: no wider than its card (a phone's date field has its own minimum width) */
.care-form, .care-form label:not(.check) { grid-template-columns: minmax(0, 1fr); }
.care-form > *, .care-form label { min-width: 0; }
#cp-cust:not([hidden]), #cp-coach:not([hidden]) { display: grid; gap: 10px; }
.care-form input[type=date]::-webkit-date-and-time-value { text-align: left; }
.care-form input[type=date] { display: block; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; -webkit-appearance: none; appearance: none; min-height: 44px; }
/* review: each exercise, its first session against its latest */
.ex-progs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ex-prog { padding: 12px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); }
.ex-head { display: flex; flex-direction: column; gap: 0; margin-bottom: 6px; }
.ex-head b { font: 400 1.1rem var(--font-display); color: var(--grape); }
.ex-cmp { width: 100%; border-collapse: collapse; font-size: .84rem; table-layout: fixed; }
.ex-cmp th, .ex-cmp td { padding: 5px 3px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); overflow-wrap: normal; word-break: normal; hyphens: none; }
.ex-cmp thead th { border-top: 0; font-size: .78rem; font-weight: 800; color: var(--muted); }
.ex-cmp thead th span { display: block; font-weight: 700; }
.ex-cmp th:first-child { width: 25%; font-weight: 800; color: var(--muted); }
.ex-cmp.cols-1 th:first-child { width: 35%; }
.ex-cmp td:last-child { font-weight: 800; }
.ex-cmp i.good, .ex-cmp i.bad { font-style: normal; font-weight: 900; }
.ex-cmp i.good { color: #3c8a00; }
.ex-cmp i.bad { color: #c2185b; }
/* the exercise page: the last time it was done */
.last-note { margin: 6px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--cream); font-size: .9rem; color: var(--ink); }
.last-note b { color: var(--grape); }
.band-dot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; border: 1.5px solid var(--grape); margin: 0 4px -1px 2px; }
