/* SELVO 1.15.0: Fit (gym plan, food, fridge, cooking mode). Same flat cards, capsule segs and chips as the rest;
   colours only from the app tokens, no gradients, no glow. Motion is transform/opacity only. */
.fit > .seg:first-child { margin-bottom: 14px; }
.fit .lbl:first-child { margin-top: 6px; }
.fit-h { display: block; font-weight: 650; font-size: 15px; margin-bottom: 6px; }
.fit-doc { margin-top: 18px; }
.fit-doc .rules li::before { background: var(--warn); }

/* plan rows and exercise sheet */
.fit-ex .txt small { font-variant-numeric: tabular-nums; }
.fit-cues .rules { margin: 2px 0; }
.fit-ci-n { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.fit-ci-n span { background: var(--p2); border-radius: 14px; padding: 10px 12px; }
.fit-ci-n b { display: block; font-size: 20px; }
.fit-ci-n small { color: var(--mute); font-size: 12.5px; font-weight: 600; }
.fit-ci .btn { margin-top: 10px; }
.fit-chips { flex-wrap: wrap; }
.fit-chips .chip { flex: 0 0 auto; padding: 0 13px; }

/* the session logger */
.fit-log .note.top { margin: 0 6px 12px; }
.fit-lx { padding: 14px 14px 10px; }
.fit-lx-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.fit-lx-h b { font-size: 17px; font-weight: 650; }
.fit-lx-h small { font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fit-sug { font-size: 13.5px; color: var(--mute); margin: 4px 0 10px; line-height: 1.4; }
.fit-sets { display: grid; grid-template-columns: 30px 1fr 1fr 44px; gap: 6px 8px; align-items: center; }
.fit-sh { text-align: center; font-size: 11.5px; font-weight: 650; color: var(--faint); text-transform: uppercase; letter-spacing: .02em; }
.fit-sn { color: var(--mute); font-weight: 650; text-align: center; }
.fit-in { height: 40px; width: 100%; min-width: 0; border-radius: 11px; background: var(--p2); color: var(--fg); border: 0; padding: 0 10px; font-size: 17px; text-align: center; -moz-appearance: textfield; }
.fit-in::-webkit-outer-spin-button, .fit-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fit-in::placeholder { font-family: var(--sys); color: var(--faint); font-size: 15px; }
.fit-in:focus { outline: 2px solid var(--fg); outline-offset: -2px; }
.fit-done { width: 44px; height: 40px; display: grid; place-items: center; }
.fit-done .box { width: 28px; height: 28px; }
.fit-add { font-size: 14px; font-weight: 650; padding: 10px 0 2px; color: var(--mute); }
.fit-rest { position: sticky; top: 8px; z-index: 3; margin: 0 0 12px; padding: 12px 16px; border-radius: 16px; background: var(--fg); color: var(--bg); font: 650 17px var(--sys); font-variant-numeric: tabular-nums; text-align: center; transition: opacity .3s var(--ease), transform .3s var(--ease); }
.fit-rest[hidden] { display: block; opacity: 0; transform: translateY(-6px); pointer-events: none; height: 0; padding: 0; margin: 0; overflow: hidden; }
.fit-rest.end { background: var(--lx-ok); color: var(--lx-ok-t); }
.fit-log > .btn.wide { margin-top: 14px; }
.fit-log > .btn.ghost.wide { margin-top: 8px; }

/* food */
.card.fit-hungry { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px; }
.card.fit-hungry .txt b { display: block; font: 600 20px/1.2 'Clash Display', 'Satoshi', sans-serif; }
.card.fit-hungry .txt small { color: var(--mute); font-size: 13.5px; }
.card.fit-hungry .txt { flex: 1; min-width: 0; }
.fit-hi { width: 26px; height: 26px; flex: none; }
.card.fit-hungry:active, .fit-sim:active, .fit-tm:active { background: var(--hl); }
.fit-nudge { font-size: 15px; line-height: 1.45; }
.fit-sim { display: block; width: 100%; text-align: left; }
.fit-sim small { display: block; font-size: 12.5px; font-weight: 650; }
.fit-sim b { display: block; font-size: 17px; font-weight: 650; margin: 2px 0; }
.fit-sim span { font-size: 13.5px; }
.fit-today { display: grid; gap: 6px; margin-bottom: 12px; }
.fit-tm { display: block; text-align: left; padding: 10px 12px; border-radius: 13px; background: var(--p2); }
.fit-tm small { display: block; font-size: 12px; color: var(--mute); font-weight: 650; }
.fit-tm b { font-weight: 600; font-size: 15px; }
.fit-dayrow .gr-l small { display: block; }
.fit-dayrow .chips { margin-top: 8px; }
.fit-filter { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 10px; padding: 0 16px; scrollbar-width: none; touch-action: pan-x pan-y; }
.fit-filter::-webkit-scrollbar { display: none; }
.fit-filter .chip { flex: 0 0 auto; padding: 0 14px; }
.fit-filter .chip.on, .fit-chips .chip.on { background: var(--acc); color: var(--acc-ink); }
.fit-like { display: inline-flex; vertical-align: -2px; color: var(--mute); }
.fit-like .i { width: 15px; height: 15px; }
.fit-swap { gap: 8px; }
.fit-swap .gr-l { flex: 0 0 34%; }
.fit-swap .gr-v { flex: 1; text-align: left; white-space: normal; line-height: 1.35; font-size: 14.5px; }
.fit-arrow .i { width: 14px; height: 14px; color: var(--faint); }

/* recipe view */
.fit-rd { font-size: 16px; color: var(--mute); margin: 2px 6px 14px; line-height: 1.4; }
.fit-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.fit-times span { background: var(--p1); border-radius: 16px; padding: 12px; }
.fit-times b { display: block; font-size: 24px; line-height: 1.1; }
.fit-times small { color: var(--mute); font-size: 12.5px; font-weight: 600; }
.fit-tags { font-size: 13px; color: var(--faint); margin: 0 6px 14px; }
.fit-rec > .btn.wide, .fit-wk > .btn.wide, .fit-shopv > .btn.wide { margin-top: 10px; }
.fit-rec .chk .num { font-weight: 700; }
.fit-eq { flex-wrap: wrap; }
.fit-eq .chip { flex: 0 0 auto; padding: 0 13px; display: inline-flex; align-items: center; background: var(--p1); color: var(--fg); font-weight: 600; }
.fit-steps { counter-reset: st; list-style: none; padding: 6px 16px; }
.fit-steps li { counter-increment: st; display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; padding: 12px 0; align-items: start; }
.fit-steps li + li { box-shadow: 0 -1px 0 var(--sepc); }
.fit-steps li::before { content: counter(st); width: 26px; height: 26px; border-radius: 50%; background: var(--p2); display: grid; place-items: center; font: 700 13px var(--sys); }
.fit-steps p { font-size: 15.5px; line-height: 1.45; }
.fit-steps small { font-size: 13px; color: var(--mute); font-weight: 650; padding-top: 4px; white-space: nowrap; }
.fit-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* cooking mode */
.fit-cook .scroll { overscroll-behavior: contain; }
.fit-cook-b { display: flex; flex-direction: column; min-height: calc(100dvh - 160px); }
.fit-prog { display: flex; gap: 5px; margin: 4px 0 18px; }
.fit-prog i { flex: 1; height: 5px; border-radius: 3px; background: var(--p3); transition: background-color .3s var(--ease); }
.fit-prog i.on { background: var(--fg); }
.fit-sx { font-size: 14px; font-weight: 650; }
.fit-big { font: 600 clamp(26px, 7.4vw, 34px)/1.25 'Clash Display', 'Satoshi', sans-serif; margin: 10px 0 22px; letter-spacing: -.005em; }
.fit-tbtn { height: 60px; font-size: 18px; }
.fit-timer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 18px; background: var(--p1); }
.fit-timer b { font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.fit-timer.rung { background: var(--lx-ok); color: var(--lx-ok-t); }
.fit-others { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 14px; color: var(--mute); }
.fit-nav { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: auto; padding-top: 24px; }
.fit-nav .btn { height: 58px; font-size: 17px; }
.fit-nav .btn[disabled] { opacity: .4; }

/* shopping */
.fit-shopv .chips { margin: 0 0 4px; }
.fit-shopv .chip { display: inline-flex; align-items: center; gap: 4px; }
.fit-shopv .chip .i { width: 12px; height: 12px; }
.fit-shopv .chk b .num { font-weight: 600; margin-left: 4px; }

/* fridge */
.fit-ing .fit-gh { font-size: 12.5px; font-weight: 650; color: var(--mute); margin: 14px 6px 6px; }
.fit-ing .fit-gh[hidden] { display: none; }
.fit-ing .chip[hidden] { display: none; }
.fit-ing .chip { background: var(--p1); }
.fit-scan-c .btn .i { width: 18px; height: 18px; }

/* scanner */
.fit-cam { position: relative; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: var(--p1); display: grid; place-items: center; margin-bottom: 12px; }
.fit-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s var(--ease); }
.fit-cam.live video { opacity: 1; }
.fit-cam p { position: relative; color: var(--mute); font-size: 15px; text-align: center; padding: 0 30px; line-height: 1.4; }
.fit-aim { position: absolute; left: 12%; right: 12%; top: 38%; bottom: 38%; border-radius: 12px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 0 0 999px rgba(0, 0, 0, .28); }
.fit-scanv > .btn.wide { margin-bottom: 8px; }
.fit-file { cursor: pointer; }
.fit-msg { margin: 6px 6px 12px; }
.fit-res .fit-pn { display: block; font-size: 18px; font-weight: 650; margin: 2px 0 2px; }
.fit-res .btn.wide { margin-top: 10px; }
.fit-coderow { display: flex; gap: 8px; align-items: center; }
.fit-coderow .fs-in { flex: 1; min-width: 0; letter-spacing: .06em; }
.fit-rr2 { display: inline-flex; align-items: center; gap: 10px; }

@media (prefers-reduced-motion: reduce) { .fit-rest, .fit-prog i, .fit-cam video { transition: none; } }

/* Health has six sections since Fit: buttons take their text width so Training and Routinen are not cut off */
.seg.hseg[data-k="hseg-health"]:not(.tabbar):not(.strip):not(.fc-seg) > button { flex: 1 1 auto; padding: 0 5px; font-size: 14px; }
.fit .note .link { display: inline; height: auto; padding: 0; font-size: inherit; line-height: inherit; }
