/* Client (asiakas) views. Phone first (320–414 px, one hand), then tablet (40rem, one wider column)
 * and desktop (64rem: side rail from shell.css, two-column layouts via .c-split / .c-dual).
 * Tokens only: colours var(--color-*), spacing var(--space-*), radii var(--radius-*), easing var(--ease-*). */

/* ---------- page rhythm ---------- */
.c-view { display: flex; flex-direction: column; gap: var(--space-xl); min-width: 0; overflow-wrap: break-word; }
.c-view > .c-head { margin-bottom: 0; }
.c-head__text { display: flex; flex-direction: column; gap: var(--space-3xs); min-width: 0; }
.c-head--stack { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: var(--space-3xs); }
.c-head__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); min-width: 0; }
.c-view .c-split { gap: var(--space-xl); }
.c-sec { display: flex; flex-direction: column; gap: var(--space-sm); min-width: 0; }
.c-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); min-width: 0; }
.c-h2 { font-size: var(--text-lg); font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; min-width: 0; }
.c-sec__aside { font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); white-space: nowrap; }
.c-version { font-size: var(--text-xs); color: var(--color-subtle); text-align: center; font-weight: 600; }
.c-view dl, .c-view dd, .sheet dl, .sheet dd { margin: 0; }

/* phone: the two columns of .c-dual melt into one list (display: contents) ordered by .c-o1…; desktop: real columns */
.c-dual > .c-dual__main, .c-dual > .c-dual__side { display: contents; }
.c-o1 { order: 1; } .c-o2 { order: 2; } .c-o3 { order: 3; } .c-o4 { order: 4; } .c-o5 { order: 5; } .c-o6 { order: 6; }
.c-o7 { order: 7; } .c-o8 { order: 8; } .c-o9 { order: 9; }
.c-o1, .c-o2, .c-o3, .c-o4, .c-o5, .c-o6, .c-o7, .c-o8, .c-o9 { min-width: 0; }
.c-ci-main, .c-ci-side, .c-me-main, .c-me-side { display: flex; flex-direction: column; gap: var(--space-xl); min-width: 0; }

/* visibility helpers */
.c-wide-only, .c-desk-only { display: none; }
@media (min-width: 40rem) {
  span.c-wide-only { display: inline; }
  div.c-wide-only { display: block; }
}
@media (max-width: 22.49rem) { .c-hide-xs { display: none; } }

/* motion: transform / opacity only, reduced motion handled globally in base.css */
.c-enter { animation: c-enter var(--dur-med) var(--ease-out) both; }
@keyframes c-enter { from { opacity: 0; transform: translateY(6px); } }
@keyframes c-fade { from { opacity: 0; } }
.c-pop { animation: c-pop var(--dur-med) var(--ease-out); }
@keyframes c-pop { from { transform: scale(0.8); } }

/* shared small bits */
.c-letter { flex: none; display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: var(--radius-xs); background: var(--color-paper-3); color: var(--color-ink); font-size: var(--text-2xs); font-weight: 800; line-height: 1; }
.c-chev { flex: none; color: var(--color-muted); transition: transform var(--dur-short) var(--ease-out); }
details[open] > summary .c-chev { transform: rotate(180deg); }
.c-live { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--color-gold); margin-right: 0.4rem; vertical-align: 0.05em; }

/* ---------- Tänään: greeting ---------- */
.c-hello { display: flex; flex-direction: column; gap: var(--space-3xs); min-width: 0; }
.c-hello__date { font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); }
.c-hello__title { font-size: var(--text-2xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; overflow-wrap: anywhere; }

/* ---------- Tänään: hero (night) ---------- */
.c-hero { border-radius: var(--radius-lg); padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-lg); min-width: 0; }
.c-hero__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); min-width: 0; }
.c-hero__target { min-width: 0; display: flex; flex-direction: column; gap: var(--space-2xs); }
.c-hero__type { display: inline-flex; align-items: center; gap: var(--space-xs); font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-night-muted); }
.c-hero__type .ic { color: var(--color-gold); flex: none; }
.c-hero__kcal { display: flex; align-items: baseline; gap: var(--space-xs); line-height: 1; min-width: 0; }
.c-hero__kcal .display { font-size: clamp(2.75rem, 12vw, 4rem); color: var(--color-night-text); }
.c-hero__unit { font-size: var(--text-sm); font-weight: 700; color: var(--color-night-muted); }
.c-hero__lead { font-size: var(--text-xs); color: var(--color-night-muted); font-weight: 600; }
.c-hero__ring { flex: none; }
.c-hero__ring .ring__num { font-size: 1.6rem; color: var(--color-night-text); }
.c-hero__macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xs); padding-top: var(--space-md); border-top: 1px solid var(--color-night-rule); }
.c-hero__m { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.c-hero__mk { font-size: var(--text-2xs); font-weight: 800; letter-spacing: 0.08em; color: var(--color-night-muted); }
.c-hero__mk abbr { text-decoration: none; cursor: help; }
.c-hero__mv { font-size: var(--text-sm); font-weight: 700; color: var(--color-night-muted); }
.c-hero__mv .num { font-family: var(--font-display); font-size: var(--text-2xl); line-height: 1; color: var(--color-night-text); font-weight: 400; }
.c-hero__me { font-size: var(--text-2xs); color: var(--color-night-muted); font-weight: 600; }
.c-hero__empty { color: var(--color-night-muted); font-size: var(--text-sm); }

/* ---------- meal list (Tänään timeline) ---------- */
.c-meals { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.c-meal { display: flex; align-items: center; gap: var(--space-xs); padding-right: var(--space-md); border-bottom: var(--rule); min-width: 0; transition: background-color var(--dur-short) var(--ease-out); }
.c-meal:last-child { border-bottom: 0; }
.c-meal:hover { background: var(--color-paper-3); }
.c-meal__main { flex: 1 1 auto; min-width: 0; display: flex; align-items: flex-start; gap: var(--space-md); min-height: 4.5rem; padding: var(--space-sm) var(--space-xs) var(--space-sm) var(--space-md); border: 0; background: transparent; color: inherit; text-align: left; -webkit-tap-highlight-color: transparent; }
.c-meal__main:active { background: var(--color-paper-4); }
.c-meal__main:focus-visible { outline-offset: -3px; }
.c-meal__time { flex: none; width: 2.75rem; display: flex; flex-direction: column; padding-top: 0.15rem; font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); }
.c-meal__next { display: inline-block; margin-left: var(--space-xs); padding: 0.05rem 0.45rem; border-radius: var(--radius-pill); background: var(--color-gold-soft); color: var(--color-gold-ink); font-size: var(--text-2xs); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 0.12em; white-space: nowrap; }
.c-meal--next .c-meal__time { color: var(--color-ink); }
.c-meal__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.c-meal__name { font-size: var(--text-base); font-weight: 800; line-height: 1.25; }
.c-meal__opt { display: flex; align-items: flex-start; gap: var(--space-xs); min-width: 0; font-size: var(--text-sm); font-weight: 600; line-height: 1.35; color: var(--color-ink-2); }
.c-meal__opt .c-letter { margin-top: 0.05rem; }
.c-meal__optname { min-width: 0; overflow-wrap: anywhere; }
.c-meal__mac { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-meal--done .c-meal__name, .c-meal--done .c-meal__opt { color: var(--color-muted); }
.c-meal--done .c-letter { background: transparent; box-shadow: inset 0 0 0 1px var(--color-rule-strong); color: var(--color-muted); }
.c-meal__tick { --size: 2.5rem; position: relative; }
/* components.css .tick fills pressed ticks with ink, which turns light in the dark theme and the gold check fades;
   night stays dark in both themes, so the gold check keeps its contrast */
.c-meal__tick[aria-pressed="true"], .c-set__tick[aria-pressed="true"] { background: var(--color-night); border-color: var(--color-night); }
.c-meal__tick::after { content: ""; position: absolute; inset: -0.4rem; border-radius: 50%; }
.c-meal__edited { font-weight: 700; color: var(--color-info-ink); }
.c-meal--done .c-meal__edited { color: inherit; }

/* ---------- workout card ---------- */
.c-wo { padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-md); min-width: 0; }
.c-wo__top { display: flex; align-items: center; gap: var(--space-md); min-width: 0; }
.c-wo__badge { flex: none; width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; background: var(--color-night); color: var(--color-gold); font-size: 1.75rem; line-height: 1; padding-top: 0.15rem; }
.c-wo__badge--done { background: var(--color-good-soft); color: var(--color-good-ink); padding-top: 0; }
.c-wo__badge--quiet { background: var(--color-paper-3); color: var(--color-ink-2); padding-top: 0; }
.c-wo__text { min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.c-wo__title { font-size: var(--text-md); font-weight: 800; line-height: 1.3; }
.c-wo__meta { font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.c-wo__list { list-style: none; margin: 0; padding: 0; column-gap: var(--space-lg); }
.c-wo__list li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-sm); padding: var(--space-xs) 0; border-top: var(--rule); font-size: var(--text-sm); min-width: 0; }
.c-wo__ex { min-width: 0; font-weight: 600; }
.c-wo__sr { flex: none; white-space: nowrap; color: var(--color-muted); font-weight: 600; }
@media (min-width: 40rem) {
  ol.c-wo__list.c-wide-only { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.c-recs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-xs); }
.c-rec { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--text-sm); font-weight: 600; min-width: 0; }
.c-rec > .ic { flex: none; color: var(--color-gold-deep); }
.c-rec__name { flex: 1 1 auto; min-width: 0; }
.c-rec__kg { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-weight: 800; white-space: nowrap; }
.c-rec__prev { font-size: var(--text-2xs); font-weight: 600; color: var(--color-muted); }

/* ---------- check-in card (Tänään) ---------- */
.c-ci { padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-md); min-width: 0; }
.c-ci__row { display: flex; align-items: center; gap: var(--space-md); min-width: 0; }
.c-ci__icon { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--color-paper-3); color: var(--color-ink); }
.c-ci--open .c-ci__icon { background: var(--color-gold-soft); color: var(--color-gold-ink); }
.c-ci__icon--done { background: var(--color-good-soft); color: var(--color-good-ink); }
.c-ci__text { flex: 1 1 auto; min-width: 0; }
.c-ci__title { font-size: var(--text-md); font-weight: 800; line-height: 1.3; }
.c-ci__meta { font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.c-ci__link { flex: none; display: inline-flex; align-items: center; gap: 0.15rem; min-height: 2.75rem; padding: 0 var(--space-xs); border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 700; color: var(--color-ink-2); text-decoration: none; }
.c-ci__link:hover { background: var(--color-paper-3); color: var(--color-ink); }

/* ---------- goals strip + hint ---------- */
.c-strip { display: flex; align-items: center; gap: var(--space-md); min-height: 4rem; padding: var(--space-md) var(--space-lg); text-decoration: none; color: inherit; transition: background-color var(--dur-short) var(--ease-out); }
.c-strip:hover { background: var(--color-paper-3); }
.c-strip:active { background: var(--color-paper-4); }
.c-strip__icon { flex: none; color: var(--color-gold-deep); }
.c-strip__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.c-strip__title { font-size: var(--text-sm); font-weight: 800; line-height: 1.35; }
.c-strip__meta { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-strip__chev { flex: none; color: var(--color-muted); }
.c-hint { position: relative; display: flex; gap: var(--space-md); padding: var(--space-md) var(--space-lg); border: 1px dashed var(--color-rule-strong); border-radius: var(--radius-md); }
.c-hint__icon { flex: none; padding-top: 0.15rem; color: var(--color-ink-2); }
.c-hint__text { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-xs); padding-right: var(--space-2xl); }
.c-hint__title { font-size: var(--text-sm); font-weight: 800; }
.c-hint__body { font-size: var(--text-sm); color: var(--color-muted); }
.c-hint__x { position: absolute; top: var(--space-2xs); right: var(--space-2xs); }

/* ---------- Tänään: home cards on top (daily check-in, progress, points) ---------- */
.c-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); min-width: 0; margin-block: calc(var(--space-xs) * -1); }
.c-card-head__t { min-width: 0; font-size: var(--text-md); font-weight: 800; line-height: 1.3; }
.c-card-head__link { flex: none; display: inline-flex; align-items: center; gap: 0.1rem; min-height: 2.75rem; margin-right: calc(var(--space-xs) * -1); padding: 0 var(--space-xs); border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 700; color: var(--color-ink-2); text-decoration: none; white-space: nowrap; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.c-card-head__link:hover { background: var(--color-paper-3); color: var(--color-ink); }
.c-card-head__link .ic { flex: none; color: var(--color-muted); }

.c-dc { padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-md); min-width: 0; }
.c-dc__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2xs) var(--space-sm); min-width: 0; }
.c-dc__title { min-width: 0; font-size: var(--text-md); font-weight: 800; line-height: 1.3; }
.c-dc__streak { flex: none; display: inline-flex; align-items: center; gap: 0.3rem; font-size: var(--text-sm); font-weight: 800; white-space: nowrap; }
.c-dc__streak .ic { flex: none; color: var(--color-gold-deep); }
.c-dc .c-week__day { padding-bottom: var(--space-xs); }
.c-dc .c-week__day--today { background: var(--color-paper-3); box-shadow: none; }
.c-dc .c-week__mark { width: 1.75rem; height: 1.75rem; }
.c-dc__done { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); min-width: 0; }
.c-dc__ok { display: inline-flex; align-items: center; gap: var(--space-xs); min-width: 0; font-size: var(--text-sm); font-weight: 800; color: var(--color-good-ink); }
.c-dc__ok .ic { flex: none; }
.c-dc__at { font-weight: 600; color: var(--color-muted); }
/* daily strip marks next to the week strip ones: today still open = outlined ring, a missed day = empty dashed ring */
.c-week__mark--open { border: 2px solid var(--color-ink); }
.c-week__mark--miss { border: 1.5px dashed var(--color-rule-strong); }

.c-hp { padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-md); min-width: 0; }
.c-hp__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); }
.c-hp__s { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.c-hp__k { font-size: var(--text-2xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); }
.c-hp__v { display: flex; align-items: baseline; gap: 0.2rem; line-height: 1; white-space: nowrap; }
.c-hp__v .display { font-size: var(--text-2xl); }
.c-hp__u { font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }
.c-hp__spark .spark { width: 100%; height: auto; }
.c-hp__foot { margin-top: calc(var(--space-xs) * -1); font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }

.c-hpts { padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-sm); min-width: 0; }
.c-hpts__row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-md); min-width: 0; }
.c-hpts__stat { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.c-hpts__stat .display { font-size: var(--text-3xl); line-height: 0.9; white-space: nowrap; }
.c-hpts__stat--end { flex: none; align-items: flex-end; text-align: right; }
.c-hpts__lab, .c-hpts__off { font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }
@media (max-width: 22.49rem) { .c-dc, .c-hp, .c-hpts { padding-inline: var(--space-md); } }

/* daily check-in form (sheet) */
.c-dcf { display: flex; flex-direction: column; gap: var(--space-xl); min-width: 0; container-type: inline-size; }
.c-dcf__lead { font-size: var(--text-sm); color: var(--color-muted); }
.c-dq__num { display: flex; align-items: center; gap: var(--space-sm); min-width: 0; }
.c-dq__in { max-width: 9rem; }
.c-dq__unit { font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); }
.c-dq__text { min-height: 4.5rem; }

/* ---------- Ruoka ---------- */
.c-food-top { display: flex; flex-direction: column; gap: var(--space-sm); min-width: 0; }
.c-target { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--space-md); row-gap: var(--space-2xs); }
.c-target__kcal { display: inline-flex; align-items: baseline; gap: var(--space-2xs); }
.c-target__kcal .display { font-size: var(--text-3xl); line-height: 1; }
.c-target__unit { font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); }
.c-target__mac { font-size: var(--text-sm); font-weight: 700; color: var(--color-ink-2); }
.c-target__note { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-planinfo { display: flex; flex-direction: column; gap: var(--space-sm); min-width: 0; }
.c-planinfo__h { font-size: var(--text-sm); font-weight: 800; }
.c-planinfo__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.c-planinfo__list li { display: flex; align-items: baseline; gap: var(--space-sm); padding: var(--space-xs) 0; border-top: var(--rule); font-size: var(--text-sm); min-width: 0; }
.c-planinfo__v { flex: none; min-width: 1.75rem; font-size: var(--text-xs); font-weight: 800; color: var(--color-muted); }
.c-planinfo__text { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.c-planinfo__at { flex: none; font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }
.c-planinfo__note { font-size: var(--text-xs); color: var(--color-muted); }
.c-food .c-planinfo { max-width: 40rem; }
.c-food__plan { font-weight: 800; color: var(--color-ink-2); }
.c-food__top { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); min-width: 0; }
/* supplements (30.11.2026, list since Aku's Loom 30.11.): a small button under the diet's name opens them in a sheet: the
   coach's general text word for word (its lines kept, long words wrapped), then each supplement with its dose, timing,
   note and the shop button */
.c-suppbtn { align-self: flex-start; min-height: 2.75rem; margin-top: var(--space-xs); }
.c-suppbtn .ic { color: var(--color-gold-deep); }
.c-suppbtn__n { min-width: 1.5rem; padding: 0.05rem 0.4rem; border-radius: var(--radius-pill); background: var(--color-paper-3); color: var(--color-ink); font-size: var(--text-xs); font-weight: 800; text-align: center; }
.c-sp { display: flex; flex-direction: column; gap: var(--space-md); min-width: 0; }
.c-sp__text { font-size: var(--text-sm); line-height: 1.5; color: var(--color-ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.c-sp__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: var(--rule); }
.c-sp__item { display: flex; flex-direction: column; gap: var(--space-xs); min-width: 0; padding: var(--space-md) 0; border-bottom: var(--rule); }
.c-sp__name { font-size: var(--text-md); font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.c-sp__facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.2rem var(--space-md); margin: 0; }
.c-sp__fact { display: contents; }
.c-sp__fact dt { font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); padding-top: 0.1rem; }
.c-sp__fact dd { margin: 0; font-size: var(--text-sm); font-weight: 700; color: var(--color-ink); overflow-wrap: anywhere; }
.c-sp__note { font-size: var(--text-sm); color: var(--color-ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.c-sp__shopline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-sm); min-width: 0; }
.c-sp__shop { flex: none; min-height: 2.75rem; }
.c-sp__host { min-width: 0; font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); overflow-wrap: anywhere; }
.c-sp__none { font-size: var(--text-sm); color: var(--color-muted); }
.c-pv__supp { margin-top: 0; border-block: var(--rule); }
.c-pv__supp > .c-sp { padding-bottom: var(--space-md); }
.c-pv__suppn { margin-left: var(--space-2xs); font-size: var(--text-xs); font-weight: 800; color: var(--color-muted); }

/* upcoming diet (Aku 13.11.: "Ruokavalio … (ketoosi)" from next week) */
.c-upc { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--space-sm) var(--space-md); padding: var(--space-md) var(--space-lg); min-width: 0; }
.c-upc__icon { align-self: start; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--color-paper-3); color: var(--color-ink); }
.c-upc__text { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.c-upc__k { font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }
.c-upc__name { font-size: var(--text-md); font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.c-upc__when { font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); }
.c-upc__btn { grid-column: 2; justify-self: start; }
@media (min-width: 30rem) {
  .c-upc { grid-template-columns: auto minmax(0, 1fr) auto; }
  .c-upc__btn { grid-column: auto; justify-self: end; }
}

/* meals with every option as a photo card: phone = a swipeable row (the next card peeks), wider = a grid */
.c-fmeals { display: flex; flex-direction: column; gap: var(--space-xl); min-width: 0; }
.c-fmeal { display: flex; flex-direction: column; gap: var(--space-sm); min-width: 0; }
.c-fmeal__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2xs) var(--space-sm); min-width: 0; }
.c-fmeal__title { display: flex; align-items: baseline; gap: var(--space-sm); min-width: 0; font-size: var(--text-lg); font-weight: 800; line-height: 1.25; }
.c-fmeal__time { flex: none; font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); }
.c-fmeal__eaten { display: inline-flex; align-items: center; gap: 0.2rem; font-size: var(--text-xs); font-weight: 700; color: var(--color-good-ink); white-space: nowrap; }
.c-fmeal__eaten .ic { flex: none; }
.c-fmeal__target { margin-left: auto; font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); white-space: nowrap; }
ul.c-orow { list-style: none; margin: 0 calc(var(--space-lg) * -1); padding: 2px var(--space-lg) var(--space-xs); display: grid; grid-auto-flow: column; grid-auto-columns: min(15rem, 70%); gap: var(--space-sm); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--space-lg); scrollbar-width: none; }
.c-orow::-webkit-scrollbar { display: none; }
.c-orow__item { display: flex; min-width: 0; scroll-snap-align: start; }
.c-ocard { position: relative; width: 100%; min-width: 0; display: flex; flex-direction: column; padding: 0; border: 1px solid var(--color-rule); border-radius: var(--radius-md); background: var(--color-paper-2); color: inherit; text-align: left; overflow: hidden; -webkit-tap-highlight-color: transparent; transition: border-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out), transform var(--dur-instant) var(--ease-out); }
button.c-ocard:hover { border-color: var(--color-rule-strong); }
button.c-ocard:active { transform: translateY(1px); }
button.c-ocard:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-md); }
.c-ocard--chosen, button.c-ocard--chosen:hover { border-color: var(--color-ink); box-shadow: 0 0 0 1px var(--color-ink); }
.c-ocard__media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--color-paper-3); }
.c-ocard__img { width: 100%; height: 100%; object-fit: cover; }
.c-ocard__ph { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
.c-ocard__pick { position: absolute; left: var(--space-xs); top: var(--space-xs); display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.2rem 0.55rem 0.2rem 0.4rem; border-radius: var(--radius-pill); background: var(--color-night); color: var(--color-night-text); font-size: var(--text-2xs); font-weight: 800; letter-spacing: 0.02em; box-shadow: 0 1px 3px var(--color-shadow-2); }
.c-ocard__pick .ic { flex: none; color: var(--color-gold); }
.c-ocard__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; padding: var(--space-sm) var(--space-md) var(--space-md); }
.c-ocard__no { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }
.c-ocard__edit { flex: none; padding: 0.05rem 0.45rem; border-radius: var(--radius-pill); background: var(--color-info-soft); color: var(--color-info-ink); font-size: var(--text-2xs); font-weight: 800; }
.c-ocard__name { font-size: var(--text-base); font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.c-ocard__kcal { margin-top: auto; padding-top: var(--space-xs); display: flex; align-items: baseline; gap: 0.25rem; font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); }
.c-ocard__kcal .num { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 400; line-height: 1; color: var(--color-ink); }
.c-ocard__mac { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-ocard__mac > span { white-space: nowrap; }
@media (min-width: 40rem) {
  ul.c-orow { margin: 0; padding: 0; grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: var(--space-md); overflow: visible; scroll-snap-type: none; }
}

/* upcoming diet preview (sheet) */
.c-pv { display: flex; flex-direction: column; gap: var(--space-lg); min-width: 0; }
.c-pv__lead { font-size: var(--text-sm); color: var(--color-ink-2); }
.c-pv__dts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-block: var(--rule); }
.c-pv__dts li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2xs) var(--space-md); padding: var(--space-xs) 0; font-size: var(--text-sm); font-weight: 600; }
.c-pv__dts li + li { border-top: var(--rule); }
.c-pv__dt { font-weight: 800; }

/* meal sheet */
.c-ms { display: flex; flex-direction: column; gap: var(--space-md); }
.c-ms__tabs .seg__btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem; min-height: 2.75rem; font-size: var(--text-md); }
.c-ms__tabs .seg__btn .ic { color: var(--color-gold-deep); }
.c-ms__title { display: flex; flex-direction: column; gap: var(--space-xs); }
.c-ms__name { font-size: var(--text-xl); font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.c-ms__badges { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.c-ms__badges:empty { display: none; }
.c-ms__macros { padding: var(--space-md) 0; border-block: var(--rule); }
.c-ms__d { color: var(--color-muted); font-weight: 600; }
.c-ms__macros .macro__k { text-transform: none; letter-spacing: 0; font-size: var(--text-xs); font-weight: 700; }
.c-ms__macros .macro__v small { margin-left: 0.1rem; font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }
.c-ms__vs { margin-top: calc(var(--space-xs) * -1); font-size: var(--text-xs); color: var(--color-muted); }
.c-ms__h { margin-top: var(--space-xs); font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); }
.c-ings { list-style: none; margin: 0; padding: 0; }
.c-ing { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); padding: var(--space-sm) 0; border-bottom: var(--rule); }
.c-ing:last-child { border-bottom: 0; }
.c-ing__name { min-width: 0; font-weight: 600; }
.c-ing__amt { flex: none; max-width: 55%; text-align: right; font-size: var(--text-sm); font-weight: 700; color: var(--color-ink-2); }
.c-steps { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: var(--space-xs); }
.c-steps li { padding-left: var(--space-2xs); }
.c-steps li::marker { font-weight: 800; color: var(--color-muted); }
.c-ms__plain { font-size: var(--text-sm); color: var(--color-muted); }
.c-ms__foot { display: flex; flex-direction: column; gap: var(--space-xs); width: 100%; }
@media (min-width: 48rem) {
  .c-ms__foot { flex-direction: row; justify-content: flex-end; }
  .c-ms__foot .btn--block { width: auto; }
}
.c-ms__media { margin-inline: calc(var(--space-lg) * -1); aspect-ratio: 4 / 3; background: var(--color-paper-3); overflow: hidden; }
.c-ms__media img { width: 100%; height: 100%; object-fit: cover; }
.c-ms__media .placeholder-media { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
@media (min-width: 48rem) { .c-ms__media { aspect-ratio: 16 / 9; } }
.c-ms__no { font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }
.c-ms__title .c-ms__no + .c-ms__name { margin-top: calc(var(--space-xs) * -1); }
.c-ms__name:focus { outline: none; }
.c-ms__hrow { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-top: var(--space-xs); }
.c-ms__hrow .c-ms__h { margin-top: 0; }
.c-ms__hrow .btn { margin-right: calc(var(--space-sm) * -1); }
.c-ms__reset { align-self: flex-start; }
/* small secondary actions still get a 44 px tap target (btn--sm is 36-40 px) */
.c-ms__hrow .btn, .c-ms__reset, .c-dc__done .btn, .c-upc__btn, .c-sum__discard, .c-food-top .seg__btn,
.c-head__row .btn, .c-hint .btn, .c-wod__foot .btn { min-height: 2.75rem; }
.c-hint__x.btn--icon { width: 2.75rem; min-width: 2.75rem; }
.c-ms__per { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }

/* the client's own amounts for today (edit mode) */
.c-edl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: var(--rule); }
.c-edl__row { display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-sm) 0; border-bottom: var(--rule); min-width: 0; }
.c-edl__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); min-width: 0; }
.c-edl__name { min-width: 0; font-weight: 700; }
.c-edl__rm { flex: none; margin-right: calc(var(--space-xs) * -1); color: var(--color-muted); }
.c-edl__rm:hover { color: var(--color-terra-ink); }
.c-edl__amt { display: flex; align-items: center; gap: var(--space-md); min-width: 0; }
.c-edl__info { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-edl__kcal { font-weight: 700; color: var(--color-ink-2); }
.c-edl__empty { padding: var(--space-md); border: 1px dashed var(--color-rule-strong); border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--color-muted); }
.c-num--g { flex: none; width: 10.5rem; }
.c-num[data-invalid="true"] { border-color: var(--color-terra); }
.c-ms__live { width: 100%; display: flex; flex-direction: column; gap: 0.15rem; padding-bottom: var(--space-2xs); }
.c-ms__sum { font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); }
.c-ms__sum strong { font-weight: 800; color: var(--color-ink); }
.c-ms__st { display: flex; align-items: flex-start; gap: 0.3rem; font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }
.c-ms__st .ic { flex: none; margin-top: 0.1rem; }
.c-ms__st--ok { color: var(--color-good-ink); }
.c-ms__foot2 { display: flex; gap: var(--space-xs); width: 100%; justify-content: flex-end; }
.c-ms__foot2 .btn { flex: 1 1 0; }
@media (min-width: 48rem) { .c-ms__foot2 .btn { flex: none; } }

/* add a food: search + amount */
.c-ms__search .input { font-size: var(--text-md); }
.c-fres { list-style: none; margin: calc(var(--space-sm) * -1) 0 0; padding: 0; display: flex; flex-direction: column; }
.c-fres > li + li { border-top: var(--rule); }
.c-fres__row { width: 100%; display: flex; align-items: center; gap: var(--space-sm); min-height: 3.25rem; padding: var(--space-xs) var(--space-2xs); border: 0; border-radius: var(--radius-sm); background: transparent; color: inherit; text-align: left; -webkit-tap-highlight-color: transparent; transition: background-color var(--dur-short) var(--ease-out); }
.c-fres__row:hover { background: var(--color-paper-3); }
.c-fres__row:active { background: var(--color-paper-4); }
.c-fres__row:focus-visible { outline-offset: -2px; }
.c-fres__row > .ic { flex: none; color: var(--color-muted); }
.c-fres__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.05rem; }
.c-fres__name { font-weight: 700; }
.c-fres__meta { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-fres__none { padding: var(--space-md) 0; font-size: var(--text-sm); color: var(--color-muted); }
.c-pick { display: flex; flex-direction: column; gap: var(--space-xs); }
.c-pick .c-ms__h { margin-top: 0; }
.c-pick__chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.c-pick__chips .chip, .c-actf__chips .chip { min-height: 2.75rem; }
.c-pick__mac { font-size: var(--text-sm); font-weight: 700; color: var(--color-ink-2); }

/* shopping list */
.c-shop { display: flex; flex-direction: column; gap: var(--space-lg); }
.c-shop__lead { font-size: var(--text-sm); color: var(--color-muted); }
.c-shop__grp { display: flex; flex-direction: column; gap: var(--space-2xs); }
.c-shop__h { font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); }
.c-shop__list { list-style: none; margin: 0; padding: 0; }
.c-shop__item { position: relative; display: flex; align-items: center; gap: var(--space-sm); min-height: 3rem; padding: var(--space-xs) 0; border-bottom: var(--rule); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.c-shop__list li:last-child .c-shop__item { border-bottom: 0; }
.c-check__input { position: absolute; left: 0; top: 50%; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.c-check { flex: none; width: 1.5rem; height: 1.5rem; border-radius: var(--radius-xs); border: 2px solid var(--color-rule-strong); background: var(--color-paper-2); display: grid; place-items: center; color: transparent; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.c-shop__item:hover .c-check { border-color: var(--color-ink); }
.c-check__input:checked + .c-check { background: var(--color-night); border-color: var(--color-night); color: var(--color-gold); }
.c-check__input:focus-visible + .c-check { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.c-shop__name { flex: 1 1 auto; min-width: 0; font-weight: 600; transition: color var(--dur-short) var(--ease-out); }
.c-check__input:checked ~ .c-shop__name { color: var(--color-muted); text-decoration: line-through; }
.c-shop__amt { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-size: var(--text-sm); font-weight: 700; }
.c-shop__g { font-size: var(--text-2xs); font-weight: 600; color: var(--color-muted); }
.c-shop__note { font-size: var(--text-xs); color: var(--color-muted); }

/* ---------- Treeni ---------- */
.c-week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-2xs); }
.c-week__day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.15rem; padding: var(--space-xs) 0 var(--space-sm); border-radius: var(--radius-sm); min-width: 0; }
.c-week__wd { font-size: var(--text-2xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); }
.c-week__date { font-size: var(--text-sm); font-weight: 700; }
.c-week__mark { margin-top: 0.2rem; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; }
.c-week__mark--plan { border: 1.5px solid var(--color-rule-strong); color: var(--color-ink); font-size: 1.2rem; line-height: 1; padding-top: 0.1rem; }
.c-week__mark--done { background: var(--color-night); color: var(--color-gold); }   /* night + gold reads in both themes (ink turns light in dark mode) */
.c-week__mark--rest::before { content: ""; width: 0.3rem; height: 0.3rem; border-radius: 50%; background: var(--color-rule-strong); }
.c-week__day--today { background: var(--color-paper-2); box-shadow: inset 0 0 0 1px var(--color-rule); }
.c-week__day--today::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--color-gold); }
.c-week__day--today .c-week__wd { color: var(--color-ink); }
.c-week__day--missed .c-week__mark--plan { border-style: dashed; color: var(--color-subtle); }
/* training days are the client's choice (Aku 15.11.): a suggested day is a dashed letter, plus a note under the week */
.c-week__mark--sugg { border-style: dashed; }
.c-week__note, .c-prog__days { display: flex; align-items: flex-start; gap: var(--space-xs); font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); }
.c-week__note { margin-top: var(--space-sm); }
.c-week__note > .ic, .c-prog__days > .ic { flex: none; margin-top: 0.15rem; color: var(--color-muted); }
.c-wo .c-wo__pick.btn--quiet { margin-top: calc(var(--space-xs) * -1); }
.c-wopick__lead { font-size: var(--text-sm); color: var(--color-ink-2); }
.c-wopick__row .c-wod__badge { flex: none; }
.c-wopick__row > .ic { color: var(--color-muted); }
.c-wopick__row :is(.row__title, .row__meta) { white-space: normal; }

.c-prog { padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-sm); }
.c-prog__name { font-size: var(--text-md); font-weight: 800; }
.c-prog__meta { font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.c-notes { margin-top: var(--space-xs); border-top: var(--rule); }
.c-notes__sum, .c-how__sum { display: flex; align-items: center; gap: var(--space-sm); min-height: 3rem; cursor: pointer; list-style: none; font-size: var(--text-sm); font-weight: 700; border-radius: var(--radius-xs); -webkit-tap-highlight-color: transparent; }
.c-notes__sum::-webkit-details-marker, .c-how__sum::-webkit-details-marker, .c-wod__sum::-webkit-details-marker { display: none; }
.c-notes__sum:hover, .c-how__sum:hover { color: var(--color-ink-2); }
.c-notes__sum > .ic:first-child, .c-how__sum > .ic:first-child { flex: none; color: var(--color-muted); }
.c-notes__text { padding-bottom: var(--space-xs); font-size: var(--text-sm); color: var(--color-ink-2); white-space: pre-line; overflow-wrap: anywhere; }   /* the coach's general instructions keep their paragraphs */

.c-wods { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-sm); align-items: start; }
@media (min-width: 48rem) {
  .c-wods { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--space-md); }
  .c-wods .c-wod__sum { min-height: 5.25rem; }
}
.c-wod { overflow: hidden; }
.c-wod__sum { display: flex; align-items: center; gap: var(--space-md); min-height: 4.25rem; padding: var(--space-md) var(--space-lg); cursor: pointer; list-style: none; transition: background-color var(--dur-short) var(--ease-out); -webkit-tap-highlight-color: transparent; }
.c-wod__sum:hover { background: var(--color-paper-3); }
.c-wod__sum:focus-visible { outline-offset: -3px; }
.c-wod__badge { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--color-paper-3); font-size: 1.4rem; line-height: 1; padding-top: 0.1rem; }
.c-wod__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.c-wod__name { font-weight: 800; }
.c-wod__meta { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-wod__body { padding: 0 var(--space-lg) var(--space-lg); border-top: var(--rule); }
.c-wod__foot { padding-top: var(--space-md); }
.c-exl { list-style: none; margin: 0; padding: 0; }
.c-exl__row { display: flex; gap: var(--space-sm); padding: var(--space-sm) 0; border-bottom: var(--rule); min-width: 0; }
.c-exl > li:last-child, .c-exl--inner > li:last-child { border-bottom: 0; }
.c-exl__n { flex: none; width: 1.5rem; font-size: var(--text-sm); font-weight: 800; color: var(--color-muted); }
.c-exl__main { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.c-exl__name { font-size: var(--text-sm); font-weight: 700; }
.c-exl__meta { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-exl__group { padding-top: var(--space-sm); border-bottom: var(--rule); }
.c-exl__tag { display: inline-flex; align-items: center; gap: 0.3rem; font-size: var(--text-2xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-info-ink); }
.c-exl--inner { padding-left: var(--space-xs); }

.c-hist, .c-cih { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.c-hist > li + li, .c-cih > li + li { border-top: var(--rule); }
.c-hist .row, .c-cih .row { border-bottom: 0; gap: var(--space-md); -webkit-tap-highlight-color: transparent; }
.c-hist .row:active, .c-cih .row:active { background: var(--color-paper-4); }
.c-hist .row:focus-visible, .c-cih .row:focus-visible { outline-offset: -3px; }
.c-hist .row > .ic, .c-cih .row > .ic { flex: none; color: var(--color-muted); }
.c-hist__date { flex: none; width: 2.75rem; display: flex; flex-direction: column; line-height: 1.2; }
.c-hist__wd { font-size: var(--text-2xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); }
.c-hist__d { font-size: var(--text-sm); font-weight: 800; }
.c-hist__ic { flex: none; width: 2.75rem; display: grid; place-items: center; color: var(--color-muted); }

/* month calendar: done workouts + cardio / other activity (Aku 13.11.) */
.c-cal-wrap { display: flex; flex-direction: column; gap: var(--space-lg); min-width: 0; }
.c-cal { padding: var(--space-xs) 0 0; min-width: 0; overflow: hidden; }
.c-cal__nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: 0 var(--space-xs) var(--space-2xs); }
.c-cal__month { font-size: var(--text-md); font-weight: 800; text-align: center; }
.c-cal__wds { list-style: none; margin: 0; padding: 0 0 var(--space-2xs); display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; font-size: var(--text-2xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); }
.c-cal__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.c-cal__cell { min-width: 0; border-top: var(--rule); }
.c-cal__cell + .c-cal__cell:not(:nth-child(7n + 1)) { border-left: var(--rule); }
.c-cal__day { width: 100%; height: 100%; min-height: 3.75rem; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.3rem 0.15rem 0.4rem; border: 0; border-radius: 0; background: transparent; color: inherit; -webkit-tap-highlight-color: transparent; transition: background-color var(--dur-short) var(--ease-out); }
.c-cal__day:hover:not(:disabled) { background: var(--color-paper-3); }
.c-cal__day:active:not(:disabled) { background: var(--color-paper-4); }
.c-cal__day:disabled { cursor: default; color: var(--color-subtle); }
.c-cal__day:focus-visible { outline-offset: -3px; }
.c-cal__n { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; font-size: var(--text-sm); font-weight: 700; }
.c-cal__day--today .c-cal__n { font-weight: 800; box-shadow: inset 0 0 0 2px var(--color-gold); }
.c-cal__day--sel { background: var(--color-paper-3); }
.c-cal__day--sel .c-cal__n { background: var(--color-ink); color: var(--color-paper-2); }
.c-cal__evs { display: flex; flex-direction: column; gap: 0.15rem; width: 100%; min-width: 0; }
.c-cal__ev { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0.05rem 0.2rem; border-radius: var(--radius-xs); font-size: var(--text-2xs); font-weight: 700; line-height: 1.35; text-align: center; }
.c-cal__ev--wo { background: var(--color-ink); color: var(--color-paper-2); }
.c-cal__ev--act { box-shadow: inset 0 0 0 1px var(--color-rule-strong); color: var(--color-ink-2); }
.c-cal__long { display: none; }
.c-cal__more { font-size: var(--text-2xs); font-weight: 700; color: var(--color-muted); text-align: center; }
.c-calday { display: flex; flex-direction: column; gap: var(--space-sm); min-width: 0; }
.c-calday__h { font-size: var(--text-md); font-weight: 800; }
.c-calday__today { font-weight: 600; color: var(--color-muted); }
.c-calday__none { padding: var(--space-md) var(--space-lg); border: 1px dashed var(--color-rule-strong); border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--color-muted); }
.c-calday__add { padding-inline: var(--space-sm); }
@media (max-width: 39.99rem) {
  /* phone: the month runs edge to edge so every day stays a 44 px target even at 320 px */
  .c-cal { margin-inline: calc(var(--space-lg) * -1); border-inline: 0; border-radius: 0; }
}
@media (min-width: 40rem) {
  .c-cal__long { display: inline; }
  .c-cal__ev { text-align: left; padding-inline: 0.35rem; }
  .c-cal__day { align-items: stretch; padding-inline: 0.3rem; }
  .c-cal__n { align-self: center; }
}
@media (min-width: 64rem) {
  .c-cal-wrap { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: var(--space-xl); align-items: start; }
  .c-cal__day { min-height: 4.5rem; }
}

/* log cardio / other activity (sheet) */
.c-actf { display: flex; flex-direction: column; gap: var(--space-lg); min-width: 0; container-type: inline-size; }
.c-actf__chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-2xs); }
.c-actf__set { margin: 0; padding: 0; border: 0; min-width: 0; }
.c-actf__set legend { padding: 0; margin-bottom: var(--space-xs); }
.c-actf__seg .seg__btn, .c-look__seg .seg__btn { min-height: 2.75rem; }
.c-actf__two, .c-actf__nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md) var(--space-sm); }
.c-actf__two .input { min-width: 0; }
.c-actf__notes { min-height: 4.5rem; }
@container (min-width: 30rem) { .c-actf__nums { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* workout summary (history sheet + finish sheet) */
.c-sum { display: flex; flex-direction: column; gap: var(--space-lg); }
.c-sum__date { font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.c-sum__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); padding: var(--space-md) 0; border-block: var(--rule); }
.c-sum__stats .stat__num { font-size: var(--text-3xl); }
.c-sum__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.c-sum__ex { display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-sm) 0; border-bottom: var(--rule); }
.c-sum__ex:last-child { border-bottom: 0; }
.c-sum__exhead { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); min-width: 0; }
.c-sum__exname { min-width: 0; font-weight: 700; }
.c-sum__sets { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.c-sum__set { padding: 0.2rem 0.6rem; border-radius: var(--radius-pill); background: var(--color-paper-3); font-size: var(--text-xs); font-weight: 700; }
.c-sum__set--undone { background: transparent; box-shadow: inset 0 0 0 1px var(--color-rule-strong); color: var(--color-muted); text-decoration: line-through; }
.c-sum__skip { font-size: var(--text-sm); color: var(--color-muted); }
.c-sum__comment { display: flex; align-items: flex-start; gap: var(--space-xs); font-size: var(--text-sm); color: var(--color-ink-2); }
.c-sum__comment .ic { flex: none; margin-top: 0.15rem; color: var(--color-muted); }
.c-sum__h { display: flex; align-items: center; gap: var(--space-xs); margin-bottom: var(--space-xs); font-size: var(--text-sm); font-weight: 800; }
.c-sum__h .ic { color: var(--color-gold-deep); }
.c-sum__undone, .c-sum__coach { font-size: var(--text-sm); color: var(--color-muted); }
.c-sum__discard { align-self: flex-start; --btn-fg: var(--color-terra-ink); padding-inline: var(--space-xs); }
.c-sum { container-type: inline-size; }
.c-sum__exs { display: flex; flex-direction: column; min-width: 0; }
.c-sum__exs .c-sum__h { margin-bottom: 0; }

/* ---------- Treeni käynnissä (focus screen) ---------- */
.c-run { --c-pad: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-lg); min-width: 0; padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
.c-run.c-enter { animation-name: c-fade; }
.c-run--resting { padding-bottom: calc(10.5rem + env(safe-area-inset-bottom)); }
.c-run--empty { padding-bottom: 0; }
.c-run__head { position: sticky; top: var(--demobar-h); z-index: var(--z-sticky); display: flex; align-items: center; gap: var(--space-xs); margin: calc(var(--c-pad) * -1) calc(var(--c-pad) * -1) 0; padding: var(--space-xs) var(--space-md) var(--space-xs) var(--space-xs); background: var(--color-paper); border-bottom: var(--rule); }
.c-run__min { flex: none; }
.c-run__title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.c-run__name { font-size: var(--text-sm); font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-run__status { display: flex; align-items: center; gap: var(--space-xs); min-width: 0; }
.c-run__elapsed { flex: none; font-size: var(--text-md); font-weight: 800; color: var(--color-ink); }
.c-saved { display: inline-flex; align-items: center; gap: 0.2rem; min-width: 0; overflow: hidden; white-space: nowrap; font-size: var(--text-2xs); font-weight: 700; color: var(--color-muted); }
.c-saved .ic { flex: none; color: var(--color-good); }
.c-saved--flash { animation: c-saved var(--dur-long) var(--ease-out); }
@keyframes c-saved { from { opacity: 0.3; } }
.c-run__prog { display: flex; align-items: center; gap: var(--space-sm); min-width: 0; }
.c-dots { list-style: none; margin: 0; padding: 0; flex: 1 1 auto; min-width: 0; display: flex; gap: 0.3rem; }
.c-dot { flex: 1 1 0; max-width: 2.5rem; height: 0.375rem; border-radius: var(--radius-pill); background: var(--color-paper-4); transition: background-color var(--dur-med) var(--ease-out); }
.c-dot--done { background: var(--color-ink); }
.c-dot--cur { background: var(--color-gold); }
.c-dot--skip { background: transparent; box-shadow: inset 0 0 0 1px var(--color-rule-strong); }
.c-run__count { flex: none; display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: 2.75rem; padding: 0 var(--space-md); border: var(--rule-strong); border-radius: var(--radius-pill); background: var(--color-paper-2); color: var(--color-ink); font-size: var(--text-sm); font-weight: 800; transition: background-color var(--dur-short) var(--ease-out); }
.c-run__count:hover { background: var(--color-paper-3); }
.c-run__count:active { background: var(--color-paper-4); }
.c-run__step { display: flex; flex-direction: column; gap: var(--space-xl); min-width: 0; }
.c-step-in { animation: c-step-next var(--dur-med) var(--ease-out); }
.c-step-in--prev { animation-name: c-step-prev; }
@keyframes c-step-next { from { opacity: 0; transform: translateX(12px); } }
@keyframes c-step-prev { from { opacity: 0; transform: translateX(-12px); } }
.c-super { display: flex; align-items: flex-start; gap: var(--space-xs); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-sm); background: var(--color-info-soft); color: var(--color-info-ink); font-size: var(--text-sm); font-weight: 600; }
.c-super .ic { flex: none; margin-top: 0.1rem; }
.c-ex { display: flex; flex-direction: column; gap: var(--space-md); min-width: 0; container-type: inline-size; }
.c-ex + .c-ex { padding-top: var(--space-xl); border-top: var(--rule-strong); }
.c-ex__head { display: flex; flex-direction: column; gap: var(--space-2xs); }
.c-ex__name { font-size: var(--text-2xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; overflow-wrap: anywhere; }
.c-ex__meta { font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.c-ex__note { font-size: var(--text-sm); font-weight: 700; color: var(--color-ink-2); white-space: pre-line; }   /* a coach's numbered instructions keep their lines */
.c-ex--skipped .c-ex__name { color: var(--color-muted); }
.c-ex__skipped { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); flex-wrap: wrap; padding: var(--space-md); border: 1px dashed var(--color-rule-strong); border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.c-video { width: 100%; aspect-ratio: auto; min-height: 4.5rem; grid-auto-flow: column; justify-content: center; align-items: center; gap: var(--space-sm); border: 0; font-family: var(--font-ui); text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.c-video:hover { background: var(--color-night-3); }
.c-video:active { background: var(--color-night); }
.c-video:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.c-cues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2xs); }
.c-cues li { position: relative; padding-left: 1rem; font-size: var(--text-sm); color: var(--color-ink-2); }
.c-cues li::before { content: ""; position: absolute; left: 0.15rem; top: 0.55em; width: 0.35rem; height: 0.35rem; border-radius: 50%; background: var(--color-rule-strong); }
.c-ex__comment { display: flex; align-items: flex-start; gap: var(--space-xs); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-sm); background: var(--color-paper-3); font-size: var(--text-sm); font-weight: 600; }
.c-ex__comment .ic { flex: none; margin-top: 0.15rem; color: var(--color-muted); }
.c-ex__tools { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-left: calc(var(--space-sm) * -1); }

.c-sets { display: flex; flex-direction: column; gap: var(--space-sm); }
.c-sets__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); }
.c-sets__title { font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); }
.c-sets__count { font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); }
.c-sets__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-xs); }
.c-set { display: flex; align-items: center; gap: var(--space-sm); min-height: 4rem; padding: var(--space-xs) var(--space-sm) var(--space-xs) var(--space-xs); border: var(--rule); border-radius: var(--radius-md); background: var(--color-paper-2); min-width: 0; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out); }
.c-set--done { background: var(--color-paper); }
.c-set--edit { border-color: var(--color-ink); box-shadow: inset 0 0 0 1px var(--color-ink); }
.c-set__no { flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--color-paper-3); color: var(--color-ink-2); font-size: var(--text-sm); font-weight: 800; }
.c-set--done .c-set__no { background: transparent; color: var(--color-muted); }
.c-set__vals { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--space-xs); min-height: 3rem; padding: 0 var(--space-xs); border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--color-ink); font-size: var(--text-lg); font-weight: 800; text-align: left; -webkit-tap-highlight-color: transparent; transition: background-color var(--dur-short) var(--ease-out); }
.c-set__vals .ic { flex: none; color: var(--color-subtle); }
.c-set__vals:hover { background: var(--color-paper-3); }
.c-set__vals:active { background: var(--color-paper-4); }
.c-set--done .c-set__vals { color: var(--color-muted); }
.c-set__ctl { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: var(--space-xs); }
.c-set__tick { flex: none; }
.c-num { display: flex; align-items: stretch; height: 3rem; max-width: 16rem; border: var(--rule-strong); border-radius: var(--radius-pill); background: var(--color-paper-2); overflow: hidden; }
.c-num__btn { flex: none; width: 2.75rem; border: 0; background: transparent; display: grid; place-items: center; color: var(--color-ink); -webkit-tap-highlight-color: transparent; transition: background-color var(--dur-instant) var(--ease-out); }
.c-num__btn:hover { background: var(--color-paper-3); }
.c-num__btn:active { background: var(--color-paper-4); }
.c-num__btn:focus-visible { outline-offset: -3px; }
.c-num__val { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 0.25rem; padding-inline: var(--space-2xs); border-inline: var(--rule); cursor: text; transition: background-color var(--dur-short) var(--ease-out); }
.c-num__val:focus-within { background: var(--color-gold-soft); }
.c-num__input { flex: 0 1 auto; width: 3.25em; min-width: 0; padding: 0; border: 0; background: transparent; text-align: right; color: var(--color-ink); font-size: var(--text-lg); font-weight: 800; }
@supports (field-sizing: content) { .c-num__input { field-sizing: content; width: auto; min-width: 1.25em; max-width: 4.5em; } }
.c-num__input:focus-visible { outline: none; }
.c-num__input[aria-invalid="true"] { color: var(--color-terra-ink); }
.c-num__unit { flex: none; font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }
/* wide enough (tablet / desktop): kg and reps side by side; kept after the base rules on purpose */
@container (min-width: 30rem) {
  .c-ex .c-set__ctl { flex-direction: row; gap: var(--space-sm); }
  .c-ex .c-set__ctl .c-num { flex: 1 1 0; min-width: 0; }
}
.c-last { display: flex; align-items: flex-start; gap: var(--space-xs); font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-last .ic { flex: none; margin-top: 0.1rem; }
.c-last--up { color: var(--color-gold-ink); }

/* bottom dock: rest timer + step navigation (thumb zone) */
.c-run__dock { position: fixed; z-index: var(--z-nav); left: 0; right: 0; bottom: 0; margin-inline: auto; max-width: var(--client-max); display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); background: var(--color-paper-2); border-top: var(--rule); }
.c-run__nav { display: flex; gap: var(--space-xs); padding: var(--space-sm) var(--space-md); }
.c-run__prev { flex: none; padding-inline: var(--space-md); }
.c-rest { position: relative; padding: var(--space-sm) var(--space-md); }
.c-rest__track { position: absolute; top: 0; left: 0; right: 0; height: 3px; overflow: hidden; background: var(--color-night-3); }
.c-rest__fill { position: absolute; inset: 0; background: var(--color-gold); transform-origin: left center; transition: transform var(--dur-med) linear; }
.c-rest__row { display: flex; align-items: center; gap: var(--space-xs); min-width: 0; }
.c-rest__time { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: var(--space-sm); }
.c-rest__label { font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-night-muted); }
.c-rest__time .display { font-size: var(--text-3xl); line-height: 1; color: var(--color-night-text); }
.c-rest--done .c-rest__label { color: var(--color-gold); }

/* list of all exercises (sheet) */
.c-jump { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-xs); }
.c-jump__row { width: 100%; display: flex; align-items: center; gap: var(--space-md); min-height: 3.5rem; padding: var(--space-sm) var(--space-md); border: var(--rule); border-radius: var(--radius-md); background: var(--color-paper-2); color: inherit; text-align: left; transition: background-color var(--dur-short) var(--ease-out); }
.c-jump__row:hover { background: var(--color-paper-3); }
.c-jump__row--cur { border-color: var(--color-ink); box-shadow: inset 0 0 0 1px var(--color-ink); }
.c-jump__n { flex: none; min-width: 2rem; font-size: var(--text-sm); font-weight: 800; color: var(--color-muted); }
.c-jump__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.c-jump__name { font-weight: 700; }
.c-jump__tag { font-size: var(--text-2xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-info-ink); }
.c-jump__st { flex: none; font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); }
.c-jump__row--done .c-jump__st { color: var(--color-good-ink); }
.c-jump__row--cur .c-jump__st { color: var(--color-gold-ink); }

/* ---------- Check-in wizard ---------- */
.c-wiz { display: flex; flex-direction: column; gap: var(--space-lg); min-width: 0; container-type: inline-size; }
.c-wiz__top { display: flex; flex-direction: column; gap: var(--space-xs); }
.c-wiz__meta { display: flex; justify-content: space-between; gap: var(--space-sm); font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }
.c-wiz__bar { height: 0.375rem; border-radius: var(--radius-pill); background: var(--color-paper-4); overflow: hidden; }
.c-wiz__fill { height: 100%; background: var(--color-gold); transform-origin: left center; transition: transform var(--dur-long) var(--ease-out); }
.c-wiz__head { display: flex; flex-direction: column; gap: var(--space-2xs); }
.c-wiz__title { font-size: var(--text-xl); font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; }
.c-wiz__title:focus { outline: none; }
.c-wiz__lead { font-size: var(--text-sm); color: var(--color-muted); }
.c-wiz__qs { display: flex; flex-direction: column; gap: var(--space-xl); }
.c-wiz__nav { position: sticky; z-index: var(--z-sticky); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--space-xs)); display: flex; gap: var(--space-xs); margin-inline: calc(var(--space-xs) * -1); padding: var(--space-xs); border-radius: var(--radius-pill); background: var(--color-paper); }
.c-wiz__back { flex: none; }

.c-q { min-width: 0; margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: var(--space-sm); }
.c-q__head { display: flex; flex-direction: column; gap: 0.1rem; }
.c-q__label { padding: 0; font-size: var(--text-md); font-weight: 800; }
legend.c-q__label { margin-bottom: var(--space-sm); }
.c-q__opt { margin-left: var(--space-xs); font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-q__hint { font-size: var(--text-sm); color: var(--color-muted); }
.c-q__delta { text-align: center; font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.c-q__err { display: flex; align-items: center; gap: var(--space-2xs); font-size: var(--text-sm); }
.c-q__err .ic { flex: none; }
.c-q__text { min-height: 5.5rem; }

.c-big { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: var(--space-xs); border: var(--rule-strong); border-radius: var(--radius-lg); background: var(--color-paper-2); transition: border-color var(--dur-short) var(--ease-out); }
.c-big--err { border-color: var(--color-terra); background: var(--color-terra-soft); }
.c-big__btn { flex: none; width: 3.5rem; height: 3.5rem; border-radius: 50%; border: var(--rule-strong); background: var(--color-paper); display: grid; place-items: center; color: var(--color-ink); -webkit-tap-highlight-color: transparent; transition: background-color var(--dur-instant) var(--ease-out), transform var(--dur-instant) var(--ease-out); }
.c-big__btn:hover { background: var(--color-paper-3); }
.c-big__btn:active { background: var(--color-paper-4); transform: scale(0.96); }
.c-big__val { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; justify-content: center; gap: var(--space-2xs); padding: var(--space-2xs) var(--space-xs) 0; border-radius: var(--radius-md); cursor: text; transition: background-color var(--dur-short) var(--ease-out); }
.c-big__val:focus-within { background: var(--color-gold-soft); }
.c-big__input { width: 100%; min-width: 0; max-width: 8rem; padding: 0; border: 0; background: transparent; text-align: right; color: var(--color-ink); font-family: var(--font-display); font-size: clamp(2.5rem, 13vw, 4rem); line-height: 1.1; font-weight: 400; }
.c-big__input:focus-visible { outline: none; }
.c-big__unit { flex: none; font-size: var(--text-md); font-weight: 700; color: var(--color-muted); }

/* Aku's form (15.11.): compact numbers (measurements, sleep hours, steps), one-line texts, the scale's 5 anchor,
 * suggestions from the daily check-in and the client's own upcoming events */
.c-qn { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-md); }
.c-qn__box { flex: 0 1 12rem; min-width: 0; display: flex; align-items: center; gap: var(--space-xs); }
.c-qn__input { flex: 1 1 auto; min-width: 0; max-width: 8.5rem; font-size: var(--text-lg); font-weight: 700; }
.c-qn__unit { flex: none; font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); }
.c-qn__delta { flex: 1 1 9rem; min-width: 0; text-align: left; }
.c-qn--err .c-qn__input { border-color: var(--color-terra); background: var(--color-terra-soft); }
.c-q__line { font-size: var(--text-md); }
.c-q__mid { margin-top: calc(var(--space-xs) * -1); text-align: center; font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-q__head--sub { margin-top: calc(var(--space-xs) * -1); }
.c-q__auto { display: flex; align-items: flex-start; gap: var(--space-2xs); }
.c-q__auto > .ic { flex: none; margin-top: 0.15em; }
.c-q__cal { display: flex; flex-direction: column; gap: var(--space-2xs); padding: var(--space-xs) var(--space-sm); border: var(--rule); border-radius: var(--radius-sm); background: var(--color-paper-2); font-size: var(--text-sm); }
.c-q__cal-h { display: flex; align-items: center; gap: var(--space-2xs); font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }
.c-q__cal-h > .ic { flex: none; }
.c-q__cal-list { display: flex; flex-direction: column; gap: 0.1rem; }
.c-q__cal-t { font-weight: 700; }

/* 1–10 always on one row (Aku 15.11.): one joined segmented strip, every number gets a tenth of the width (28 px at
 * 320 px), neighbours share their border, only the outer corners are round, the raised cell shows its whole border */
.c-scale { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); }
.c-scale__btn { position: relative; min-width: 0; min-height: 3rem; margin: 0 0 0 -1px; padding: 0; border: var(--rule-strong); border-radius: 0; background: var(--color-paper-2); color: var(--color-ink); font-size: var(--text-md); font-weight: 800; line-height: 1; -webkit-tap-highlight-color: transparent; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.c-scale__btn:first-child { margin-left: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.c-scale__btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.c-scale__btn:hover { z-index: 1; background: var(--color-paper-3); border-color: var(--color-muted); }
.c-scale__btn:active { background: var(--color-paper-4); }
.c-scale__btn[aria-pressed="true"] { z-index: 1; background: var(--color-ink); border-color: var(--color-ink); color: var(--color-paper-2); }
.c-scale__btn:focus-visible { z-index: 2; }
@container (max-width: 18.75rem) { .c-scale__btn { font-size: var(--text-base); letter-spacing: -0.01em; } }   /* 320 px: "10" keeps air in its 28 px cell */
.c-q--err .c-scale__btn, .c-q--err .c-opt { border-color: var(--color-terra); }
.c-scale__ends { display: flex; justify-content: space-between; gap: var(--space-sm); font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }

.c-opts { display: grid; gap: var(--space-xs); }
.c-opts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.c-opt { position: relative; display: flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: var(--space-xs) var(--space-xl); border: var(--rule-strong); border-radius: var(--radius-md); background: var(--color-paper-2); color: var(--color-ink); font-size: var(--text-base); font-weight: 700; text-align: center; overflow-wrap: anywhere; -webkit-tap-highlight-color: transparent; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.c-opt:hover { background: var(--color-paper-3); border-color: var(--color-muted); }
.c-opt:active { background: var(--color-paper-4); }
.c-opt[aria-pressed="true"] { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-paper-2); }
.c-opt__ic { position: absolute; left: var(--space-sm); opacity: 0; transform: scale(0.6); color: var(--color-gold); transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.c-opt[aria-pressed="true"] .c-opt__ic { opacity: 1; transform: scale(1); }
/* Aku's esitietolomake 21.11.2026: long options (activity levels) as left-aligned rows, and "valitse kaikki sopivat"
   lists with a checkbox square, so a multi-pick never looks like a one-of-many choice */
.c-opts--long .c-opt { justify-content: flex-start; text-align: start; padding-inline: calc(var(--space-sm) + 1.75rem) var(--space-md); font-weight: 600; }
.c-opts--multi .c-opt { justify-content: flex-start; gap: var(--space-sm); min-height: 3rem; padding: var(--space-xs) var(--space-md) var(--space-xs) var(--space-sm); text-align: start; font-weight: 600; }
.c-opt__box { flex: none; display: grid; place-items: center; width: 1.375rem; height: 1.375rem; border: var(--rule-strong); border-radius: var(--radius-xs); background: var(--color-paper); color: transparent; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.c-opt[aria-pressed="true"] .c-opt__box { background: var(--color-gold); border-color: var(--color-gold); color: var(--color-ink); }
.c-opt__t { min-width: 0; }

.c-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); }
@container (min-width: 34rem) { .c-photos { max-width: 30rem; } }
.c-photo { cursor: pointer; transition: border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out), opacity var(--dur-short) var(--ease-out); }
label.c-photo:hover { border-color: var(--color-ink); background: var(--color-paper-4); }
.c-photo:focus-within { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.c-photo[data-state="loading"] { opacity: 0.55; }
.c-photo--filled { margin: 0; border-style: solid; cursor: default; }
.c-photo__cap { position: absolute; left: var(--space-2xs); bottom: var(--space-2xs); padding: 0.1rem 0.45rem; border-radius: var(--radius-pill); background: var(--color-night); color: var(--color-night-text); font-size: var(--text-2xs); font-weight: 700; }
.c-photo__x { position: absolute; top: var(--space-2xs); right: var(--space-2xs); width: 2rem; height: 2rem; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--color-night); color: var(--color-night-text); }
.c-photo__x::after { content: ""; position: absolute; inset: -0.4rem; border-radius: 50%; }
.c-photo__x:hover { background: var(--color-night-3); }

.c-rev { display: flex; flex-direction: column; gap: var(--space-xs); padding-bottom: var(--space-md); border-bottom: var(--rule); }
.c-rev:last-child { padding-bottom: 0; border-bottom: 0; }
.c-rev__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.c-rev__h { font-size: var(--text-md); font-weight: 800; }
.c-rev__list { display: flex; flex-direction: column; }
.c-rev__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); padding: var(--space-xs) 0; font-size: var(--text-sm); min-width: 0; }
.c-rev__row + .c-rev__row { border-top: var(--rule); }
.c-rev__row dt { min-width: 0; font-weight: 600; color: var(--color-muted); }
.c-rev__row dd { flex: none; max-width: 60%; text-align: right; font-weight: 700; }
.c-rev__row--block { flex-direction: column; align-items: stretch; gap: var(--space-2xs); }
.c-rev__row--block dd { max-width: none; text-align: left; }
.c-rev__text { font-weight: 500; }
.c-rev__none { font-weight: 600; color: var(--color-subtle); }
.c-rev__photos { display: inline-flex; flex-wrap: wrap; gap: var(--space-xs); }
.c-rev__photos img { width: 4rem; height: 5.25rem; object-fit: cover; border-radius: var(--radius-xs); }
.c-rev__meta { font-size: var(--text-sm); color: var(--color-muted); }
.c-rev--sheet { padding-bottom: 0; border-bottom: 0; gap: var(--space-sm); }

/* check-in sent / upcoming */
.c-ci-done { padding: var(--space-xl) var(--space-lg); display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); text-align: center; }
.c-ci-done__icon { width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--color-night); color: var(--color-gold); }
.c-ci-done__title { font-size: var(--text-2xl); font-weight: 800; letter-spacing: -0.02em; }
.c-ci-done__title:focus { outline: none; }
.c-ci-done__text { max-width: 32ch; color: var(--color-ink-2); }
.c-ci-done__pts { font-size: var(--text-sm); font-weight: 800; color: var(--color-gold-ink); }
.c-ci-done__facts { width: 100%; margin: var(--space-xs) 0; display: flex; flex-direction: column; text-align: left; border-block: var(--rule); }
.c-ci-done__facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); padding: var(--space-sm) 0; min-width: 0; }
.c-ci-done__facts > div + div { border-top: var(--rule); }
.c-ci-done__facts dt { font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.c-ci-done__facts dd { text-align: right; font-size: var(--text-sm); font-weight: 700; }
.c-ci-done__d { margin-left: var(--space-xs); font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }
.c-ci-done__btns { width: 100%; display: flex; flex-direction: column; gap: var(--space-xs); }
.c-ci-done__edit { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-ci-wa { width: 100%; display: flex; flex-direction: column; gap: var(--space-sm); padding: var(--space-md); border-radius: var(--radius-md); background: var(--color-paper-3); text-align: left; }
.c-ci-wa__text { display: flex; gap: var(--space-xs); align-items: flex-start; font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); }
.c-ci-wa__text .ic { flex: none; margin-top: 0.1rem; color: var(--color-muted); }
.c-ci-next { padding: var(--space-lg); display: flex; align-items: flex-start; gap: var(--space-md); }
.c-ci-next__icon { flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--color-paper-3); color: var(--color-ink); }
.c-ci-next__text { min-width: 0; display: flex; flex-direction: column; gap: var(--space-2xs); }
.c-ci-next__title { font-size: var(--text-md); font-weight: 800; }
.c-ci-next__meta { font-size: var(--text-sm); color: var(--color-muted); }

/* history + change since start */
.c-since { padding: var(--space-md) var(--space-lg); display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); }
.c-since__text { min-width: 0; }
.c-since__num { display: flex; align-items: baseline; gap: var(--space-2xs); line-height: 1; }
.c-since__num .display { font-size: var(--text-4xl); }
.c-since__unit { font-weight: 700; color: var(--color-muted); }
.c-since__lab { margin-top: var(--space-2xs); font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-since__spark { flex: none; }
.c-cih__vals { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 0.1rem; }
.c-cih__w { font-size: var(--text-sm); font-weight: 800; }
.c-cih__d { font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }
.c-cih__d.down { color: var(--color-good-ink); }
.c-prev { padding: var(--space-lg); }
.c-prev__h { margin-bottom: var(--space-xs); font-size: var(--text-sm); font-weight: 800; }
.c-prev__row { display: flex; justify-content: space-between; gap: var(--space-md); padding: var(--space-xs) 0; border-top: var(--rule); font-size: var(--text-sm); }
.c-prev__row dt { font-weight: 600; color: var(--color-muted); }
.c-prev__row dd { font-weight: 700; text-align: right; }
.c-prev__win { margin-top: var(--space-sm); display: flex; flex-direction: column; gap: 0.15rem; font-size: var(--text-sm); }
.c-prev__lab { font-size: var(--text-2xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); }

/* ---------- Minä ---------- */
.c-prof { padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-lg); min-width: 0; }
.c-prof__top { display: flex; align-items: center; gap: var(--space-md); min-width: 0; }
.c-prof__who { min-width: 0; }
.c-prof__name { font-size: var(--text-lg); font-weight: 800; line-height: 1.25; }
.c-prof__coach { font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.c-period { display: flex; flex-direction: column; gap: var(--space-xs); min-width: 0; }
.c-period__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2xs) var(--space-sm); font-size: var(--text-sm); font-weight: 700; }
.c-period__meta { font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }

.c-progress { padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-lg); min-width: 0; }
.c-measure { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.c-measure__item { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.c-measure__k { font-size: var(--text-2xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); }
.c-measure__v { display: flex; align-items: baseline; gap: 0.25rem; line-height: 1.05; }
.c-measure__v .display { font-size: var(--text-2xl); }
.c-measure__u { font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); }
.c-measure__s { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-progress__chart { padding-top: var(--space-md); border-top: var(--rule); }
.c-progress__chart .legend { margin-top: var(--space-xs); }

/* goal map (Aku 15.11.): one regular timeline from the start, Valmennuksen aloitus · vko 2 · vko 3 · 1 KK · vko 5 …
 * One rail, dots, text: past filled, the current week gold ("Olet tässä"), future hollow; month markers stronger than
 * the one-line week rows. Every row draws its own piece of the rail, above its dot (::before) and below it (::after),
 * so the line stays unbroken whatever the row height. --dy = the dot centre = padding-top + half the first line. */
.c-goal { padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-md); min-width: 0; --c-map-bg: var(--color-paper-2); }
.c-goal__head { display: flex; flex-direction: column; gap: var(--space-2xs); padding-bottom: var(--space-md); border-bottom: var(--rule); }
.c-goal__main { font-size: var(--text-md); font-weight: 700; line-height: 1.4; }
.c-goal__sub { font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.c-goal__cap { font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }
.c-goal__pending { display: flex; flex-direction: column; gap: var(--space-xs); padding-bottom: var(--space-xs); border-bottom: var(--rule); }
.c-goal__empty { font-size: var(--text-sm); color: var(--color-muted); }
.c-goal > .c-map { margin-top: calc(var(--space-xs) * -1); }
.c-goal__all { padding-inline: var(--space-sm); }   /* block button, centred label: keeps one line at 320 px */

.c-map { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; min-width: 0; }
.c-map__row { --dy: 1rem; position: relative; min-width: 0; padding-left: calc(2rem + var(--space-xs)); }
.c-map__row--mark { --dy: 1.375rem; }
.c-map__row::before, .c-map__row::after { content: ""; position: absolute; left: calc(1rem - 1px); width: 2px; background: var(--color-rule-strong); }
.c-map__row::before { top: 0; height: var(--dy); }
.c-map__row::after { top: var(--dy); bottom: 0; }
.c-map__row:first-child::before, .c-map__row:last-child::after { display: none; }
.c-map__row--past::before, .c-map__row--past::after, .c-map__row--now::before { background: var(--color-ink); }
.c-map__dot { position: absolute; z-index: var(--z-base); left: 1rem; top: var(--dy); width: 0.625rem; height: 0.625rem; border: 2px solid var(--color-rule-strong); border-radius: 50%; background: var(--c-map-bg); transform: translate(-50%, -50%); }
.c-map__row--mark .c-map__dot { width: 1rem; height: 1rem; }
.c-map__row--past .c-map__dot { border-color: var(--color-ink); background: var(--color-ink); }
.c-map__row--now .c-map__dot { width: 1.125rem; height: 1.125rem; border: 3px solid var(--c-map-bg); background: var(--color-gold); box-shadow: 0 0 0 2px var(--color-gold-deep); }
.c-map__row--now.c-map__row--mark .c-map__dot { width: 1.375rem; height: 1.375rem; }

.c-map__line { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); min-width: 0; padding-block: 0.375rem; line-height: 1.25rem; }
.c-map__row--mark .c-map__line { padding-block: 0.625rem; line-height: 1.5rem; }
.c-map__label { min-width: 0; font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.c-map__row--past .c-map__label { color: var(--color-ink-2); }
.c-map__row--mark .c-map__label { font-size: var(--text-base); font-weight: 800; color: var(--color-ink); }
.c-map__row--now .c-map__label { font-weight: 800; color: var(--color-ink); }
.c-map__here { display: inline-block; margin-left: var(--space-2xs); padding: 0 0.5rem; border-radius: var(--radius-pill); background: var(--color-gold-soft); color: var(--color-gold-ink); font-size: var(--text-2xs); font-weight: 800; line-height: 1.25rem; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.c-map__date { flex: none; font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }
.c-map__end { padding-bottom: var(--space-xs); font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }

/* a coach milestone under its row: tick or target, title, one meta line; the next one adds the progress line */
.c-map__ms { display: grid; grid-template-columns: 1rem minmax(0, 1fr); column-gap: var(--space-xs); padding-bottom: var(--space-sm); min-width: 0; }
.c-map__msic { margin-top: 0.125rem; color: var(--color-muted); }
.c-map__ms--done .c-map__msic { color: var(--color-good-ink); }
.c-map__ms--next .c-map__msic { margin-top: 0; color: var(--color-ink); }
.c-map__msbody { min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.c-map__kick { font-size: var(--text-2xs); font-weight: 800; line-height: 1rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-gold-ink); }
.c-map__mst { font-size: var(--text-sm); font-weight: 700; line-height: 1.4; color: var(--color-ink-2); }
.c-map__ms--next .c-map__mst { font-weight: 800; color: var(--color-ink); }
.c-map__msm { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-map__ms--next .c-map__msm { color: var(--color-ink-2); }
.c-map__bar { height: 0.375rem; max-width: 16rem; margin-block: var(--space-2xs); }

/* the whole year in a sheet: quarters, one column on phones, two side by side in a wide sheet */
.c-yr { --c-map-bg: var(--color-paper); display: flex; flex-direction: column; gap: var(--space-lg); min-width: 0; container-type: inline-size; }
.c-yr__lead { font-size: var(--text-md); font-weight: 700; line-height: 1.4; }
.c-yr__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xl) var(--space-2xl); }
@container (min-width: 40rem) { .c-yr__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.c-yr__q { display: flex; flex-direction: column; gap: var(--space-xs); min-width: 0; }
.c-yr__qh { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); padding-bottom: var(--space-xs); border-bottom: var(--rule); }
.c-yr__h { font-size: var(--text-sm); font-weight: 800; }
.c-yr__range { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); white-space: nowrap; }

.c-pts { padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-md); }
.c-pts__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-md); }
.c-pts__rank { align-items: flex-end; text-align: right; }
.c-pts__top .stat__label { overflow-wrap: anywhere; }
.c-lb { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: var(--rule); }
.c-lb__row { display: flex; align-items: center; gap: var(--space-sm); min-height: 2.75rem; padding: 0 var(--space-sm); border-bottom: var(--rule); font-size: var(--text-sm); min-width: 0; }
.c-lb__row--me { border-radius: var(--radius-sm); border-bottom-color: transparent; background: var(--color-gold-soft); }
.c-lb__rank { flex: none; width: 1.5rem; font-weight: 800; color: var(--color-muted); }
.c-lb__nick { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.c-lb__you { margin-left: var(--space-xs); font-size: var(--text-2xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-gold-ink); }
.c-lb__pts { flex: none; font-weight: 800; }
.c-pts__off { font-size: var(--text-sm); color: var(--color-muted); }
.c-switchrow { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); min-height: 3.5rem; padding: var(--space-sm) 0; border-top: var(--rule); cursor: pointer; }
.c-switchrow__text { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.c-switchrow__title { font-weight: 700; }
.c-switchrow__meta { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-switchrow .switch { flex: none; }
.c-switchrow:hover .switch__track { box-shadow: 0 0 0 3px var(--color-paper-4); }

.c-ev { padding: var(--space-md) var(--space-lg); }
.c-ev__h { margin-bottom: var(--space-xs); font-size: var(--text-sm); font-weight: 800; }
.c-ev__list { list-style: none; margin: 0; padding: 0; }
.c-ev__row { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs) 0; border-top: var(--rule); font-size: var(--text-sm); min-width: 0; }
.c-ev__pts { flex: none; min-width: 2.5rem; font-weight: 800; color: var(--color-good-ink); }
.c-ev__label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.c-ev__at { flex: none; font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-how { border: var(--rule); border-radius: var(--radius-md); background: var(--color-paper-2); }
.c-how__sum { padding: 0 var(--space-lg); }
/* Aku 15.11.: the open list lines up with its summary. Texts start where "Miten pisteitä saa?" starts (padding + 18 px
 * info icon + gap), points end where the chevron ends. (.c-how > beats base.css ul[role="list"] { padding: 0 }) */
.c-how > .c-how__list { list-style: none; margin: 0; padding: 0 var(--space-lg) var(--space-xs) calc(var(--space-lg) + 18px + var(--space-sm)); }
.c-how__list li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); min-height: 2.5rem; padding: var(--space-2xs) 0; border-top: var(--rule); font-size: var(--text-sm); }
.c-how__list li span:first-child { min-width: 0; }
.c-how__list li span:last-child { flex: none; font-weight: 800; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.c-setlist { padding: var(--space-2xs) var(--space-lg) var(--space-md); display: flex; flex-direction: column; }
.c-setlist__info { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) 0; font-size: var(--text-sm); font-weight: 700; }
.c-setlist__info .ic { flex: none; color: var(--color-muted); }
.c-setlist__note { display: flex; align-items: flex-start; gap: var(--space-xs); margin: var(--space-2xs) 0 var(--space-xs); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-sm); background: var(--color-info-soft); color: var(--color-info-ink); font-size: var(--text-xs); font-weight: 600; }
.c-setlist__note .ic { flex: none; margin-top: 0.05rem; }
.c-setlist__btn { width: 100%; display: flex; align-items: center; gap: var(--space-sm); min-height: 3rem; padding: 0; border: 0; border-top: var(--rule); background: transparent; color: var(--color-ink); font-weight: 700; text-align: left; }
.c-setlist__btn .ic { flex: none; color: var(--color-muted); }
.c-setlist__btn:hover .grow { text-decoration: underline; text-underline-offset: 3px; }

.c-plist { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.c-plist > li + li { border-top: var(--rule); }
.c-plist__row { width: 100%; display: flex; align-items: center; gap: var(--space-md); min-height: 3.75rem; padding: var(--space-sm) var(--space-lg); }
.c-plist__btn { border: 0; background: transparent; color: inherit; text-align: left; -webkit-tap-highlight-color: transparent; transition: background-color var(--dur-short) var(--ease-out); }
.c-plist__btn:hover { background: var(--color-paper-3); }
.c-plist__btn:active { background: var(--color-paper-4); }
.c-plist__btn:focus-visible { outline-offset: -3px; }
.c-plist__btn > .ic { flex: none; color: var(--color-muted); }
.c-plist__ic { flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--color-paper-3); color: var(--color-ink-2); }
.c-plist__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.c-plist__title { font-weight: 700; }
.c-plist__meta { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }

/* appearance (Aku 13.11.): Vaalea / Tumma / Laitteen mukaan; stacks when the panel is too narrow for one row */
.c-look { padding: var(--space-md); display: flex; flex-direction: column; gap: var(--space-sm); min-width: 0; container-type: inline-size; }
.c-look__seg .seg__btn { padding-inline: 0.6rem; }
.c-look__note { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
@container (max-width: 17.75rem) {
  .c-look__seg { flex-direction: column; border-radius: var(--radius-md); }
  .c-look__seg .seg__btn { flex: none; border-radius: var(--radius-sm); }
}

/* install instructions sheet */
.c-insts { display: flex; flex-direction: column; gap: var(--space-lg); }
.c-inst { display: flex; flex-direction: column; gap: var(--space-xs); }
.c-inst__h { font-size: var(--text-md); font-weight: 800; }
.c-inst__steps { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: var(--space-2xs); }
.c-inst__steps li { padding-left: var(--space-2xs); }
.c-inst__steps li::marker { font-weight: 800; color: var(--color-muted); }
.c-inst__note { font-size: var(--text-sm); color: var(--color-muted); }

/* ---------- tablet (40rem+): one wider column ---------- */
@media (min-width: 40rem) {
  .c-measure { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .c-video { min-height: 5.5rem; }
  .c-hero { padding: var(--space-xl); }
  .c-run__dock { border-inline: var(--rule); }
}
@media (min-width: 40rem) and (max-width: 63.99rem) {
  .c-run__dock { max-width: var(--client-max-tablet); }
}

/* ---------- desktop (64rem+): rail + two columns ---------- */
@media (min-width: 64rem) {
  .c-view { gap: var(--space-2xl); }
  .c-hello__title, .c-view .c-head__title { font-size: var(--text-3xl); }
  .c-dual > .c-dual__main, .c-dual > .c-dual__side { display: flex; flex-direction: column; gap: var(--space-xl); min-width: 0; }
  .c-wiz__nav { bottom: var(--space-md); }
  section.c-desk-only { display: block; }
  .c-food-top { padding: var(--space-lg); border: var(--rule); border-radius: var(--radius-md); background: var(--color-paper-2); }
  .c-food__top { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: var(--space-lg); }
  .c-planinfo { padding: 0 var(--space-2xs); }
  .c-meal__main { min-height: 4.75rem; padding-block: var(--space-md); }
  .c-prof { flex-direction: row; align-items: center; gap: var(--space-2xl); }
  .c-prof__top { flex: none; min-width: 16rem; }
  .c-period { flex: 1 1 auto; }
  .c-run { --c-pad: var(--space-2xl); }
  .c-run__dock { max-width: var(--client-focus-max); border-radius: var(--radius-md) var(--radius-md) 0 0; }
  .c-ex__name { font-size: var(--text-3xl); }
  .c-video { min-height: 7rem; }
}

/* ========== Aku 15.11. (B): own meal times · own events in the Treeni calendar · check-in photo from camera or gallery ========== */
/* Ruoka: the meals heading with "Kellonajat", and the times sheet (switch + one time per meal + reset) */
.c-fmeals__head { align-items: center; }
.c-fmeals__head .c-h2 { font-size: var(--text-xl); }   /* one step above the meal names (text-lg) */
.c-fmeals__times { min-height: 2.75rem; margin-right: calc(var(--space-sm) * -1); }
.c-mtime { display: flex; flex-direction: column; gap: var(--space-md); min-width: 0; }
.c-mtime__lead { font-size: var(--text-sm); color: var(--color-ink-2); }
.c-mtime__switch { align-self: flex-start; font-size: var(--text-base); font-weight: 700; }
.c-mtime__off { padding: var(--space-md) var(--space-lg); border: 1px dashed var(--color-rule-strong); border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--color-muted); }
.c-mtime__set { display: flex; flex-direction: column; gap: var(--space-sm); min-width: 0; margin: 0; padding: 0; border: 0; }
.c-mtime__list { list-style: none; margin: 0; padding: 0; border-block: var(--rule); }
.c-mtime__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-2xs) var(--space-md); min-height: 3.75rem; padding: var(--space-xs) 0; }
.c-mtime__row + .c-mtime__row { border-top: var(--rule); }
.c-mtime__text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.c-mtime__name { font-weight: 800; overflow-wrap: anywhere; cursor: pointer; }
.c-mtime__hint { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-mtime__hint:empty { display: none; }
.c-mtime__in { width: 8.5rem; font-variant-numeric: tabular-nums; }
.c-mtime__err { grid-column: 1 / -1; }
.c-mtime__reset { align-self: flex-start; min-height: 2.75rem; }

/* Treeni calendar: future days open; the client's events run as a band across their days (rounded at the first and
   last day, name on the first day and at each row start); a key under the grid; day panel + "Tulevat menot" beside it */
.c-cal__day--future .c-cal__n { color: var(--color-muted); }
.c-cal__day--future.c-cal__day--sel .c-cal__n { color: var(--color-paper-2); }
.c-cal__ev--life { margin-inline: -0.15rem; padding-inline: 0.3rem; border-radius: 0; background: var(--color-info-soft); color: var(--color-info-ink); text-align: left; }
.c-cal__ev--from { margin-left: 0; border-top-left-radius: var(--radius-xs); border-bottom-left-radius: var(--radius-xs); }
.c-cal__ev--to { margin-right: 0; border-top-right-radius: var(--radius-xs); border-bottom-right-radius: var(--radius-xs); }
@media (min-width: 40rem) {
  .c-cal__ev--life { margin-inline: -0.3rem; padding-inline: 0.3rem; }
  .c-cal__ev--from { margin-left: 0; }
  .c-cal__ev--to { margin-right: 0; }
}
.c-cal__key { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); padding: var(--space-sm) var(--space-lg); border-top: var(--rule); font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-cal__key > span { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.c-cal__sw { display: inline-block; width: 1rem; height: 0.75rem; border-radius: 3px; }
.c-cal__sw--wo { background: var(--color-ink); }
.c-cal__sw--act { box-shadow: inset 0 0 0 1px var(--color-rule-strong); }
.c-cal__sw--life { width: 1.75rem; background: var(--color-info-soft); box-shadow: inset 0 0 0 1px var(--color-info-ink); }
.c-cal-side { display: flex; flex-direction: column; gap: var(--space-xl); min-width: 0; }
.c-life { display: flex; flex-direction: column; gap: var(--space-sm); min-width: 0; }
.c-life__ic { color: var(--color-info-ink); }
.c-life__row .row__meta, .c-life__up .row__meta { white-space: normal; overflow-wrap: anywhere; }
.c-life__now { display: inline-block; margin-left: var(--space-xs); padding: 0.05rem 0.45rem; border-radius: var(--radius-pill); background: var(--color-info-soft); color: var(--color-info-ink); font-size: var(--text-2xs); font-weight: 800; letter-spacing: 0.02em; vertical-align: 0.12em; }
.c-lifef__note { display: flex; align-items: flex-start; gap: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); }
.c-lifef__note .ic { flex: none; margin-top: 0.15rem; }
.c-lifef__del { min-height: 2.75rem; }
@container (max-width: 20rem) { .c-lifef .c-actf__two { grid-template-columns: minmax(0, 1fr); } }   /* 320 px: the two dates stack, no clipped date */

/* check-in photos: on touch an empty slot is a button that asks camera or gallery (sheet with two big choices) */
button.c-photo { width: 100%; padding: 0; -webkit-tap-highlight-color: transparent; }
button.c-photo:hover { border-color: var(--color-ink); background: var(--color-paper-4); }
button.c-photo:active { background: var(--color-paper-4); }
button.c-photo:focus:not(:focus-visible) { outline: none; }
label.c-photo:not(:has(:focus-visible)) { outline: none; }   /* desktop slot: the ring only for keyboard focus, not after a click */
.c-phsrc { display: flex; flex-direction: column; gap: var(--space-sm); padding-top: var(--space-2xs); }
.c-phsrc__opt { display: flex; align-items: center; gap: var(--space-md); min-height: 4.5rem; padding: var(--space-md) var(--space-lg); border: var(--rule-strong); border-radius: var(--radius-md); background: var(--color-paper-2); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out); }
.c-phsrc__opt:hover { background: var(--color-paper-3); border-color: var(--color-muted); }
.c-phsrc__opt:active { background: var(--color-paper-4); }
.c-phsrc__opt:has(:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.c-phsrc__ic { flex: none; width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; background: var(--color-paper-3); color: var(--color-ink); }
.c-phsrc__text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.c-phsrc__t { font-size: var(--text-md); font-weight: 800; }
.c-phsrc__s { font-size: var(--text-sm); color: var(--color-muted); }

/* chat with the coach (Aku 19.11.: opens the coach's WhatsApp chat) */
.c-chat { flex: none; min-height: 2.75rem; min-width: 2.75rem; justify-content: center; }
.c-head__tools { display: flex; align-items: center; gap: var(--space-xs); flex: none; min-width: 0; }
.c-hello--chat { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: var(--space-sm); }
.c-hello__text { display: flex; flex-direction: column; gap: var(--space-3xs); min-width: 0; }
@media (max-width: 22.49rem) { .c-chat__l { display: none; } .c-chat { padding-inline: 0; } }

/* exercise list: every exercise opens its video and cues without starting the workout (valmennettavien palaute 19.11.) */
.c-exl__btn { width: 100%; align-items: center; text-align: left; background: none; border: 0; border-bottom: var(--rule); border-radius: 0; font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color var(--dur-short) var(--ease-out); }
.c-exl__btn:hover { background: var(--color-paper-3); }
.c-exl__btn:active { background: var(--color-paper-3); }
.c-exl__btn:focus-visible { outline-offset: -2px; }
.c-exl > li:last-child > .c-exl__btn, .c-exl--inner > li:last-child > .c-exl__btn { border-bottom: 0; }
.c-exl__btn .c-exl__main { flex: 1 1 auto; }
.c-exl__go { flex: none; display: inline-flex; padding-inline: var(--space-xs); color: var(--color-muted); }
.c-wod__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.c-exs { display: flex; flex-direction: column; gap: var(--space-sm); }
.c-exs__where { font-size: var(--text-xs); font-weight: 700; color: var(--color-muted); }
.c-exs__rx { font-weight: 800; }
.c-exs__none { padding: var(--space-md); border-radius: var(--radius-md); background: var(--color-paper-3); font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.c-exs__h { margin-top: var(--space-xs); font-size: var(--text-sm); font-weight: 800; }

/* shopping list, step 1: the meals she will make (valmennettavien palaute 19.11.) */
.c-shop__tabs { margin-bottom: var(--space-md); }
.c-shop__quick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); }
.c-shop__quick .btn { min-height: 2.75rem; }
.c-shop__soon { display: flex; gap: var(--space-xs); align-items: flex-start; font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); }
.c-shop__soon .ic { flex: none; margin-top: 0.1rem; color: var(--color-muted); }
.c-shop__empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); }
.c-spk { display: flex; align-items: center; gap: var(--space-sm); min-height: 3.5rem; padding: var(--space-xs) 0; border-bottom: var(--rule); min-width: 0; }
.c-shop__list li.c-spk:last-child { border-bottom: 0; }
.c-spk__no { flex: none; }
.c-spk__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.c-spk__name { font-weight: 700; font-size: var(--text-sm); overflow-wrap: anywhere; }
.c-spk__meta { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.c-spk--on .c-spk__no { background: var(--color-night); color: var(--color-gold); }
.c-cnt { flex: none; display: inline-flex; align-items: center; border: 1px solid var(--color-rule-strong); border-radius: var(--radius-pill); background: var(--color-paper-2); overflow: hidden; }
.c-cnt__b { width: 2.75rem; min-height: 2.75rem; display: grid; place-items: center; border: 0; background: transparent; color: var(--color-ink); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.c-cnt__b:hover { background: var(--color-paper-3); }
.c-cnt__b:active { background: var(--color-paper-4); }
.c-cnt__b:focus-visible { outline-offset: -3px; }
.c-cnt__b:disabled { color: var(--color-muted); cursor: default; background: transparent; opacity: 0.5; }
.c-cnt__n { min-width: 1.75rem; text-align: center; font-weight: 800; }
.c-spk--on .c-cnt { border-color: var(--color-ink); }

/* intake (alkukysely, Aku 19.11.) */
.c-intake { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-sm) var(--space-md); align-items: start; padding: var(--space-lg); margin-bottom: var(--space-lg); background: var(--color-night); color: var(--color-night-text); border-color: var(--color-night); }
.c-intake__icon { width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--color-night-3); color: var(--color-gold); }
.c-intake__text { display: flex; flex-direction: column; gap: var(--space-2xs); min-width: 0; }
.c-intake__title { font-size: var(--text-lg); font-weight: 800; letter-spacing: -0.01em; }
.c-intake__lead { font-size: var(--text-sm); color: var(--color-night-muted); }
.c-intake__btn { grid-column: 1 / -1; min-height: 2.75rem; justify-self: stretch; }
@media (min-width: 40rem) {
  .c-intake { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
  .c-intake__btn { grid-column: auto; justify-self: end; }
}
.c-in-main { max-width: 40rem; }
.c-prof__intake { display: flex; align-items: center; gap: var(--space-sm); min-height: 2.75rem; margin-top: var(--space-sm); padding: var(--space-xs) 0; border-top: var(--rule); color: var(--color-ink); text-decoration: none; font-weight: 700; font-size: var(--text-sm); }
.c-prof__intake:hover .grow { text-decoration: underline; }
.c-prof__intake-st { font-weight: 600; font-size: var(--text-xs); color: var(--color-muted); }

/* check-in exercise videos (Aku 21.11.2026): the block on the last step, the rows while uploading, the players */
.c-vids { display: flex; flex-direction: column; gap: var(--space-sm); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
.c-vids__list { display: flex; flex-direction: column; gap: var(--space-xs); }
.c-vid { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-xs) var(--space-sm) var(--space-sm); border-radius: var(--radius-md); background: var(--color-paper-2); border: 1px solid var(--color-rule); min-width: 0; }
.c-vid__ic { flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--color-paper-3); color: var(--color-ink-2); }
.c-vid--done .c-vid__ic { background: var(--color-good-soft); color: var(--color-good-ink); }
.c-vid--err .c-vid__ic { background: var(--color-terra-soft); color: var(--color-terra-ink); }
.c-vid__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-3xs); }
.c-vid__name { font-size: var(--text-sm); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-vid__meta { font-size: var(--text-xs); color: var(--color-muted); }
.c-vid__err { font-size: var(--text-xs); font-weight: 600; color: var(--color-terra-ink); overflow-wrap: anywhere; }
.c-vid__bar { display: block; height: 4px; border-radius: 2px; background: var(--color-paper-4); overflow: hidden; }
.c-vid__fill { display: block; height: 100%; background: var(--color-gold-deep); transform-origin: left center; transition: transform 160ms linear; }
.c-vid__x { flex: none; }
.c-vids__add { gap: var(--space-xs); }
.c-vids__full { text-align: center; }
.c-vview { display: flex; flex-direction: column; gap: var(--space-sm); }
.c-vview__n { color: var(--color-muted); font-weight: 700; }
.c-vview__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
.c-vview__item { display: flex; flex-direction: column; gap: var(--space-2xs); min-width: 0; }
.c-vview__video { display: block; width: 100%; max-height: 70vh; border-radius: var(--radius-md); background: var(--color-night); }
.c-vview__none { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-md); border-radius: var(--radius-md); background: var(--color-paper-3); font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.c-vview__cap { overflow-wrap: anywhere; }
@media (min-width: 1024px) { .kc-vids .c-vview__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .c-vid__fill { transition: none; } }

/* "Esikatsele treeni" (Aku 21.11.2026): the whole workout before starting, like the client's plan in Kahunas */
.c-pv { display: flex; flex-direction: column; gap: var(--space-md); }
.c-pv__meta { font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); }
.c-pv__notes { display: flex; flex-direction: column; gap: var(--space-2xs); padding: var(--space-md); border-radius: var(--radius-md); background: var(--color-gold-soft); color: var(--color-ink); }
.c-pv__h { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--text-sm); font-weight: 800; }
.c-pv__notes-t { font-size: var(--text-sm); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.c-pv__list { display: flex; flex-direction: column; gap: var(--space-sm); }
.c-pv__ex { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: var(--space-sm); padding: var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-md); background: var(--color-paper-2); }
.c-pv__tag { width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--color-ink); color: var(--color-paper); font-size: var(--text-lg); line-height: 1; }
.c-pv__ex--sup .c-pv__tag { background: var(--color-gold-deep); color: var(--color-night); font-size: var(--text-md); }
.c-pv__main { min-width: 0; display: flex; flex-direction: column; gap: var(--space-xs); }
.c-pv__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2xs) var(--space-xs); font-size: var(--text-md); font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.c-pv__sup { font-size: var(--text-2xs); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-gold-ink); }
.c-pv__rx { font-size: var(--text-sm); font-weight: 700; color: var(--color-ink-2); }
.c-pv__media { width: 100%; max-width: 32rem; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-night); }
.c-pv__thumb { position: relative; display: grid; place-items: center; width: 100%; height: 100%; padding: 0; border: 0; background: var(--color-night-2); color: var(--color-night-text); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.c-pv__thumb--link { width: auto; height: auto; display: inline-flex; gap: var(--space-xs); align-items: center; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 700; text-decoration: none; justify-self: start; }
.c-pv__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.c-pv__play { position: relative; width: 3.25rem; height: 3.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--color-gold); color: var(--color-night); box-shadow: 0 2px 10px var(--color-shadow-2); transition: transform var(--dur-short) var(--ease-out); }
.c-pv__thumb:hover .c-pv__play { transform: scale(1.06); }
.c-pv__thumb:focus-visible { outline: 3px solid var(--color-gold); outline-offset: -3px; }
.c-pv__frame { display: block; width: 100%; height: 100%; border: 0; }
.c-pv__note { display: flex; gap: var(--space-xs); align-items: flex-start; font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); overflow-wrap: anywhere; white-space: pre-line; }
.c-pv__note .ic { flex: none; margin-top: 0.15rem; color: var(--color-muted); }
.c-pv__cues { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: var(--space-2xs); font-size: var(--text-sm); line-height: 1.5; color: var(--color-ink-2); overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .c-pv__play { transition: none; } }

/* shopping list: every option at once (Aku 21.11.2026) */
.c-shop__bulk { flex: 1 1 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-xs) var(--space-sm); padding: var(--space-sm); border-radius: var(--radius-md); background: var(--color-paper-3); }
.c-shop__bulk-l { font-size: var(--text-sm); font-weight: 700; color: var(--color-ink-2); }
.c-shop__bulk > .btn { grid-column: 1 / -1; width: 100%; }
