/* Кабинет участницы как приложение в телефоне (docs/cabinet-spec.md, раздел 2).
   Подключается после app.css, theme.css, style.css и glass.css; берёт их токены (--bg, --sheet, --accent…),
   поэтому работает в «Бургунди» и «Классике», в светлой и тёмной теме. */

body.cab { background: var(--bg); min-height: 100dvh; }
.cab .c-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; max-width: 560px; margin: 0 auto;
  padding: 10px 16px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); }
.cab .c-top .wordmark { font-size: 1.25rem; margin-right: auto; }
.c-back { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 14px; background: var(--stone); color: var(--ink); font: 500 1.5rem/1 var(--f-text); cursor: pointer; }
.c-back[hidden] { display: none; }
html.tg .c-top { display: none; }

.c-page { max-width: 560px; margin: 0 auto; padding: 6px 16px calc(40px + env(safe-area-inset-bottom)); }
body.has-tabs .c-page { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
body.has-bar .c-page { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
body.has-tabs.has-bar .c-page { padding-bottom: calc(176px + env(safe-area-inset-bottom)); }
.c-page h1 { font-size: clamp(2rem, 1.6rem + 2vw, 2.6rem); line-height: 1.02; }
.c-page .c-h { font-size: clamp(1.875rem, 1.5rem + 1.6vw, 2.375rem); line-height: 1.04; }
.c-h2, .c-page .sheet h2 { font: 500 1.375rem/1.12 var(--f-display); letter-spacing: -.005em; }
.c-kicker { font-size: .8125rem; font-weight: 600; color: var(--muted); }
.mt-l { margin-top: 20px; }
.c-gap { height: 28px; }
.small { font-size: .875rem; line-height: 1.45; }

/* Карточки */
.c-card, .c-page .sheet { display: block; margin-top: 12px; padding: 16px; border-radius: 22px; background: var(--sheet); color: inherit; text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--hair); }
.c-page .sheet + .sheet { margin-top: 12px; }
a.c-card { transition: transform .25s var(--ease-out, ease), box-shadow .25s; }
a.c-card:active { transform: scale(.985); }
.c-row-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: inherit; text-decoration: none; min-height: 44px; }
.c-row-link > span { display: grid; gap: 2px; }
.c-row-link small, .c-grow small { display: block; color: var(--muted); font-size: .8125rem; line-height: 1.4; }
.c-row-link > i { font-style: normal; font-size: 1.5rem; color: var(--muted); }
.sheet.c-row-link { display: flex; }
.c-card .c-row-link + .c-row-link { border-top: 1px solid var(--hair); }
.c-grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.c-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.c-two .btn { width: 100%; padding: 0 10px; }
.btn.block { width: 100%; }

/* Следующая тренировка — бордовая карточка */
.c-next { margin-top: 12px; padding: 18px; border-radius: 24px; color: #f6e5dc;
  background: linear-gradient(160deg, #6b2233, #3a141e); box-shadow: inset 0 0 0 1px rgba(246, 229, 220, .08); }
.c-next h2 { font: 500 1.75rem/1.05 var(--f-display); margin-top: 4px; }
.c-next .c-kicker { color: rgba(246, 229, 220, .72); }
.c-next .chips span { background: rgba(246, 229, 220, .14); color: inherit; }
.c-page .chips { flex-wrap: wrap; }
.c-page .chips span { white-space: normal; max-width: 100%; line-height: 1.3; border-radius: 18px; padding-block: 7px; }
.btn.c-light { background: #fcf8f4 !important; color: #7b1e34 !important; box-shadow: none !important; }
.btn.c-glass { background: rgba(246, 229, 220, .14) !important; color: var(--photo-ink, #f6e5dc) !important; box-shadow: inset 0 0 0 1px rgba(246, 229, 220, .26) !important; }

/* Неделя на «Сегодня» */
.c-week { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.c-wd { display: grid; gap: 2px; padding: 10px; border-radius: 16px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--hair); color: inherit; text-decoration: none; font-size: .8125rem; line-height: 1.25; min-height: 64px; }
.c-wd small { font-weight: 700; color: var(--muted); }
.c-wd span { font-weight: 600; }
.c-wd em { font-style: normal; color: var(--good); font-weight: 600; font-size: .75rem; }
.c-wd.done { background: var(--good-bg); box-shadow: none; }
.c-wd.locked { opacity: .55; }

/* Кольцо и полосы */
.c-ring { position: relative; width: 84px; height: 84px; flex: none; }
.c-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.c-ring circle { fill: none; stroke-width: 9; }
.c-ring .r-bg { stroke: var(--stone); }
.c-ring .r-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray .6s var(--ease-out, ease); }
.c-ring .r-fg.empty { opacity: 0; }
.c-ring .r-t { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.c-ring .r-t b { font: 500 1.375rem/1 var(--f-display); font-variant-numeric: lining-nums tabular-nums; }
.c-ring .r-t small { font-size: .6875rem; color: var(--muted); margin-top: 2px; }
.c-food-grid { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; }
.c-macros { display: grid; gap: 8px; font-size: .8125rem; }
.c-macros .between { margin-bottom: 4px; }
.c-mf .bar i { background: var(--mocha, #a47864); }
.c-mc .bar i { background: #c9a25c; }
.c-calm { padding: 10px 12px; border-radius: 14px; background: var(--stone); }

/* Квест, замок */
.c-quest { display: flex; align-items: center; gap: 12px; }
.c-quest .q-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--blush, #f3cfd3); color: var(--accent); }
.c-quest .q-ico svg { width: 20px; height: 20px; }
.c-quest .bar { margin-top: 6px; }
.c-lock { display: flex; gap: 12px; align-items: flex-start; }
.c-lock-ico { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--stone); color: var(--muted); }
.c-lock-ico svg { width: 18px; height: 18px; }
.c-ask { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); }

/* Сегменты и чипы */
.c-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: var(--stone); margin-top: 8px; }
.c-seg > * { min-height: 40px; display: grid; place-items: center; padding: 0 8px; border: 0; border-radius: 12px; background: none; color: var(--muted);
  font: 700 .875rem/1.15 var(--f-text); text-align: center; text-decoration: none; cursor: pointer; }
.c-seg > [aria-checked="true"], .c-seg > [aria-current="true"] { background: var(--sheet); color: var(--ink); box-shadow: 0 2px 8px -2px rgba(42, 17, 23, .18); }
.c-seg-top { margin-top: 2px; }
.c-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.c-chips::-webkit-scrollbar { display: none; }
.c-chips > * { flex: none; min-height: 36px; display: inline-flex; align-items: center; gap: 4px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--sheet);
  box-shadow: inset 0 0 0 1px var(--hair-strong); color: var(--ink); font: 600 .8125rem var(--f-text); text-decoration: none; cursor: pointer; white-space: nowrap; }
.c-chips > [aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }

/* Поля, флажки, ссылки */
.c-check { display: flex; gap: 12px; align-items: flex-start; font-size: .9375rem; line-height: 1.4; cursor: pointer; }
.c-check input { width: 24px; height: 24px; flex: none; margin: 0; accent-color: var(--accent); }
.c-check.c-card { display: flex; }
.c-link { display: block; margin-left: auto; margin-right: auto; min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--accent); font: 600 .9375rem var(--f-text); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.c-link[disabled] { opacity: .35; cursor: default; }
.c-danger { color: var(--bad) !important; }
.btn.c-danger-fill { background: var(--bad) !important; color: #fff !important; }
.c-facts { display: grid; gap: 10px; }
.c-facts li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--hair); }
.c-facts b { font-size: .9375rem; }
.c-facts span { font-size: .9375rem; color: var(--muted); }
.c-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.c-form .c-wide { grid-column: 1 / -1; }
.c-form .field input, .c-sheet .field input, .c-sheet .field select, .c-sheet textarea { width: 100%; }
.field textarea { width: 100%; font: 400 1rem var(--f-text); padding: 10px 12px; border-radius: 14px; border: 0; background: var(--field, #fff); box-shadow: inset 0 0 0 1px var(--hair-strong); color: var(--ink); }
.c-list { display: grid; }
.c-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hair); }
.c-list li:first-child { border-top: 0; }
.c-list li > span { display: grid; gap: 2px; }
.c-list small { color: var(--muted); font-size: .8125rem; }
.c-pre { white-space: pre-wrap; font: 500 .875rem/1.5 ui-monospace, Menlo, monospace; padding: 12px; border-radius: 14px; background: var(--stone); }
.c-chart { width: 100%; height: auto; }
.c-chart .ch-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.c-chart .ch-dot { fill: var(--sheet); stroke: var(--accent); stroke-width: 2; }

/* Нижние вкладки — «жидкое стекло» */
.c-tabs { position: fixed; z-index: 50; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); width: min(528px, calc(100% - 24px)); transform: translateX(-50%);
  display: grid; grid-template-columns: repeat(4, 1fr); height: 64px; border-radius: 26px;
  background: color-mix(in srgb, var(--sheet) 74%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 12px 32px -14px rgba(42, 17, 23, .4), inset 0 0 0 1px var(--hair); }
.c-tabs[hidden] { display: none; }
.c-tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font: 600 .75rem/1 var(--f-text); -webkit-tap-highlight-color: transparent; }
.c-tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.c-tabs a.on { color: var(--accent); }
.c-tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 18px; }

/* Кнопки внизу: на сайте — своя панель, в демо Telegram — имитация MainButton и SecondaryButton */
.cab-bar, .tg-buttons { position: fixed; z-index: 55; left: 50%; transform: translateX(-50%); width: min(528px, calc(100% - 24px));
  bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 8px; }
body.has-tabs .cab-bar, body.has-tabs .tg-buttons { bottom: calc(86px + env(safe-area-inset-bottom)); }
.cab-bar .btn { flex: 1; min-height: 52px; }
.cab-bar .btn.quiet { flex: 0 1 38%; }
.cab-bar [hidden], .tg-buttons [hidden] { display: none !important; }
.tg-buttons .tg-main { position: static; flex: 1; }
.tg-second { flex: 0 1 38%; min-height: 54px; border: 0; border-radius: 14px; background: var(--stone); color: var(--ink); font: 600 1rem var(--f-text); cursor: pointer; }
html.tg body { padding-bottom: 0; }
body.has-bar .c-site-only, html.tg .c-site-only { display: none !important; }

/* Нижний лист */
.c-sheet-wrap { position: fixed; inset: 0; z-index: 80; }
.c-sheet-bg { position: absolute; inset: 0; background: rgba(20, 8, 12, .42); opacity: 0; transition: opacity .25s; }
.c-sheet { position: absolute; left: 50%; bottom: 0; width: min(560px, 100%); max-height: 88dvh; overflow: auto; overscroll-behavior: contain;
  padding: 22px 18px calc(24px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--bg); color: var(--ink);
  transform: translate(-50%, 24px); opacity: 0; transition: transform .3s var(--ease-out, ease), opacity .25s; }
.c-sheet::before { content: ""; display: block; width: 40px; height: 5px; margin: -10px auto 14px; border-radius: 3px; background: var(--hair-strong); }
.c-sheet-wrap.on .c-sheet-bg { opacity: 1; }
.c-sheet-wrap.on .c-sheet { transform: translate(-50%, 0); opacity: 1; }
body.sheet-open .cab-bar, body.sheet-open .tg-buttons { z-index: 85; }
body.sheet-open { overflow: hidden; }

/* Тренировки: программа, список, техника */
.c-weeks .c-card { padding: 14px 16px; }
/* Закрытая неделя: приглушён только заголовок, дата открытия читается полностью (контраст AA) */
.c-wk.locked .c-h2 { color: var(--muted); }
.c-wlist, .c-exlist, .c-lib, .c-recipes, .c-flist { display: grid; gap: 0; }
.c-wlist li a, .c-exlist li > a, .c-exlist li.c-ex-aux, .c-lib li a { display: flex; align-items: center; gap: 12px; padding: 10px 0; color: inherit; text-decoration: none; border-top: 1px solid var(--hair); min-height: 52px; }
.c-wlist li:first-child a { border-top: 0; }
.c-wlist i, .c-exlist i, .c-lib i { font-style: normal; color: var(--muted); font-size: 1.375rem; }
.c-wn { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--stone); font: 700 .8125rem var(--f-text); }
.c-wlist li.done .c-wn { background: var(--good-bg); color: var(--good); }
.c-exlist { margin-top: 14px; padding: 4px 16px; border-radius: 22px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--hair); }
.c-exlist li:first-child > * { border-top: 0; }
.c-ex-aux .c-wn { background: none; color: var(--muted); }
.c-lib { padding: 4px 16px; border-radius: 22px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--hair); }
.c-lib li:first-child a { border-top: 0; }
.c-thumb { width: 40px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--stone); color: var(--muted); }
.c-thumb svg { width: 22px; height: 22px; }
.c-grow-card summary { display: grid; gap: 2px; cursor: pointer; list-style: none; }
.c-grow-card summary::-webkit-details-marker { display: none; }
.c-grow-card summary small { color: var(--muted); }
.c-grow-card[open] summary { margin-bottom: 4px; }
.c-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.c-frame { margin: 0; text-align: center; }
.c-frame-img { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: 16px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--hair-strong); color: var(--muted); }
.c-frame-img svg { width: 40%; height: auto; opacity: .55; }
.c-frame-img em { position: absolute; left: 8px; top: 6px; font: 700 .75rem var(--f-text); font-style: normal; }
.c-frame figcaption { margin-top: 4px; font-size: .75rem; font-weight: 700; }
.c-cues { display: grid; gap: 8px; }
.c-cues li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: .9375rem; line-height: 1.4; }
.c-cues li span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: var(--good-bg); color: var(--good); font: 700 .75rem var(--f-text); }
.c-mistake { display: flex; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--bad-bg); }
.c-mistake > span { color: var(--bad); font-weight: 700; }
.c-mistake p { font-size: .9375rem; line-height: 1.4; }
.c-mistake b { display: block; color: var(--bad); }

/* Плеер: тёмный экран тренировки */
body.c-dark { background: #1d0b11; color: #f6e5dc; }
body.c-dark .c-top { background: rgba(29, 11, 17, .86); }
body.c-dark .c-top .wordmark { color: #f6e5dc; }
body.c-dark .c-back { background: rgba(246, 229, 220, .12); color: #f6e5dc; }
body.c-dark .c-link { color: #f3cfd3; }
.c-player { color: #f6e5dc; }
.c-player .c-kicker, .c-on-dark { color: rgba(246, 229, 220, .72); }
.c-ptop { display: flex; align-items: center; gap: 10px; }
.c-ptitle { display: grid; font-weight: 700; font-size: .875rem; line-height: 1.3; }
.c-ptitle small { font-weight: 500; opacity: .7; }
.c-clock { margin-left: auto; font: 700 .9375rem var(--f-text); font-variant-numeric: tabular-nums; opacity: .85; }
.c-segs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin-top: 10px; }
.c-segs i { height: 4px; border-radius: 3px; background: rgba(246, 229, 220, .18); }
.c-segs .d { background: #9fd0a8; }
.c-segs .n { background: #f6e5dc; }
.c-pname { font: 500 1.75rem/1.05 var(--f-display); margin-top: 2px; }
.c-player .c-kicker { margin-top: 14px; }
.c-vid { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; text-align: center; padding: 16px;
  background: linear-gradient(170deg, #4a1a27, #2a0f17); color: rgba(246, 229, 220, .8); font-size: .9375rem; }
.c-vid-l { aspect-ratio: 16 / 10; }
.c-vid-s { aspect-ratio: 16 / 9; color: rgba(246, 229, 220, .8); }
.c-vid-tag { position: absolute; left: 12px; top: 12px; padding: 4px 9px; border-radius: 9px; background: rgba(0, 0, 0, .35); font: 700 .75rem var(--f-text); color: #f6e5dc; }
.c-vid-tech { position: absolute; right: 12px; top: 10px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 12px; background: rgba(246, 229, 220, .92); color: #3a141e; font: 700 .8125rem var(--f-text); cursor: pointer; }
.c-wm { position: absolute; right: 12px; bottom: 10px; font: 700 .75rem var(--f-text); letter-spacing: .06em; opacity: .6; pointer-events: none; }
.c-sets { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.c-sets > span { display: inline-flex; gap: 6px; }
.c-sets i { width: 10px; height: 10px; border-radius: 50%; background: rgba(246, 229, 220, .22); }
.c-sets .d { background: #9fd0a8; }
.c-sets .n { background: #f6e5dc; box-shadow: 0 0 0 3px rgba(246, 229, 220, .22); }
.c-sets small { margin-left: auto; opacity: .75; font-size: .8125rem; }
.c-hint { padding: 10px 12px; border-radius: 14px; background: rgba(159, 208, 168, .16); color: #cfe9d4; font-size: .875rem; line-height: 1.4; }
.c-steps { display: grid; gap: 8px; }
.c-step { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; border-radius: 18px; background: rgba(246, 229, 220, .08); }
.c-step > button, .c-step > a { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border: 0; border-radius: 14px; background: rgba(246, 229, 220, .14); color: #f6e5dc; font: 500 1.5rem/1 var(--f-text); text-decoration: none; cursor: pointer; }
.c-step > span { text-align: center; line-height: 1.1; }
.c-step > span b { font: 500 1.75rem/1 var(--f-display); font-variant-numeric: lining-nums tabular-nums; }
.c-step > span small { display: block; font-size: .75rem; opacity: .7; margin-top: 3px; }
.c-step-light { background: var(--sheet); box-shadow: inset 0 0 0 1px var(--hair); }
.c-step-light > button, .c-step-mini > a { background: var(--stone); color: var(--ink); }
.c-step-mini { padding: 4px; gap: 6px; background: var(--stone); }
.c-step-mini > a { width: 36px; height: 36px; background: var(--sheet); color: var(--ink); font-size: 1.25rem; }
.c-step-mini > span b { font-size: 1.25rem; }
.c-pnav { display: flex; justify-content: space-between; }
.c-pnav .c-link { margin: 0; }
.c-watch { display: grid; gap: 6px; font-size: .8125rem; }
.c-watch .bar { background: rgba(246, 229, 220, .18); }
.c-watch .bar i { background: #f6e5dc; }
.c-chapters { display: grid; gap: 6px; }
.c-chapters button { width: 100%; display: grid; grid-template-columns: 28px 1fr; gap: 0 10px; align-items: center; text-align: left; padding: 10px 12px; border: 0; border-radius: 16px;
  background: rgba(246, 229, 220, .07); color: inherit; font: inherit; cursor: pointer; }
.c-chapters button span { grid-row: span 2; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(246, 229, 220, .14); font: 700 .75rem var(--f-text); }
.c-chapters button small { opacity: .7; font-size: .8125rem; }
.c-chapters button[aria-current="true"] { background: rgba(246, 229, 220, .2); box-shadow: inset 0 0 0 1px rgba(246, 229, 220, .4); }

/* Таймер отдыха и работы — на весь экран: цифры видно с коврика, видео и счётчики не перекрываются */
.c-timer { position: fixed; z-index: 70; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom)); text-align: center; color: #f6e5dc;
  background: rgba(42, 14, 22, .95); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
  animation: cTimerIn .3s var(--ease-out, ease) both; }
/* На сайте с нижней панелью кнопок таймер заканчивается над ней; в Telegram кнопки нативные, ниже страницы */
body.has-bar:not(.tg) .c-timer { bottom: calc(80px + env(safe-area-inset-bottom)); }
.c-timer-ring { position: relative; width: min(66vw, 42vh, 288px); aspect-ratio: 1; }
.c-timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.c-timer-ring circle { fill: none; stroke-width: 6; }
.c-timer-ring .t-bg { stroke: rgba(246, 229, 220, .18); }
.c-timer-ring .t-fg { stroke: #f6e5dc; stroke-linecap: round; }
.c-timer.work .t-fg { stroke: #9fd0a8; }
.c-timer-ring .r-t { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.c-timer-ring .r-t b { font: 500 clamp(4.25rem, min(20vw, 13vh), 6.5rem)/1 var(--f-display); font-variant-numeric: lining-nums tabular-nums; }
.c-timer-ring .r-t small { font-size: .9375rem; opacity: .78; margin-top: 8px; }
.c-timer-txt { max-width: 420px; }
.c-timer-txt b { display: block; font-size: 1.25rem; }
.c-timer-txt p { font-size: .9375rem; line-height: 1.45; opacity: .82; margin-top: 6px; }
.c-timer-txt .c-next-up { opacity: 1; font-weight: 600; }
.c-timer-btns { width: min(420px, 100%); display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; margin-top: 4px; }
@keyframes cTimerIn { from { opacity: 0; } to { opacity: 1; } }

/* Итог */
.c-done { text-align: center; padding-top: 24px; }
.c-done-ico { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--good-bg); color: var(--good); }
.c-done-ico svg { width: 36px; height: 36px; }
.c-stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.c-stats div { padding: 14px 8px; border-radius: 18px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--hair); }
.c-stats b { display: block; font: 500 2rem/1 var(--f-display); font-variant-numeric: lining-nums; }
.c-stats small { font-size: .75rem; color: var(--muted); }
.c-done .dots, .c-done .c-quest { text-align: left; }

/* Питание */
.c-day { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .9375rem; }
.c-arr { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 14px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--hair); color: var(--muted); text-decoration: none; font-size: 1.25rem; }
.c-glasses { display: flex; flex-wrap: wrap; gap: 4px; }
.c-glass-btn { width: 34px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; cursor: pointer; }
.c-glass-btn svg { width: 18px; height: 24px; fill: none; stroke: color-mix(in srgb, var(--ink) 30%, transparent); stroke-width: 1.5; }
.c-glass-btn.on svg { fill: #8fb3c9; stroke: #5f8aa3; }
.c-water small { color: var(--muted); font-size: .8125rem; }
.c-meal + .c-meal { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hair); }
.c-meal-head { display: flex; align-items: baseline; justify-content: space-between; }
.c-meal-head small { color: var(--muted); font-size: .8125rem; }
.c-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 0; border: 0; border-top: 1px solid var(--hair); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.c-meal-head + .c-item { border-top: 0; }
.c-item b { font-weight: 600; font-size: .9375rem; }
.c-k { text-align: right; flex: none; font-size: .9375rem; }
.c-k small { display: block; color: var(--muted); font-size: .75rem; }
.c-add { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; min-height: 40px; color: var(--accent); font-weight: 700; font-size: .875rem; text-decoration: none; }
.c-add i { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 9px; background: var(--blush, #f3cfd3); font-style: normal; font-size: 1.125rem; }
.c-flist { padding: 4px 16px; border-radius: 22px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--hair); }
.c-flist li button { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 0; border: 0; border-top: 1px solid var(--hair); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.c-flist li:first-child button { border-top: 0; }
.c-flist li button i { font-style: normal; color: #c9a25c; }
.c-flist li.muted { padding: 14px 0; font-size: .9375rem; }
.c-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 12px 14px; border-radius: 16px; background: var(--stone); font-size: .875rem; }
.c-sum b { font: 500 1.5rem/1 var(--f-display); font-variant-numeric: lining-nums; }
.c-recipes { gap: 8px; }
.c-recipes a { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 20px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--hair); color: inherit; text-decoration: none; }
.c-rphoto { width: 64px; height: 64px; flex: none; border-radius: 16px; background: linear-gradient(150deg, var(--blush, #f3cfd3), color-mix(in srgb, var(--mocha, #a47864) 50%, var(--sheet))); }
.c-rhero { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 24px; background: linear-gradient(150deg, var(--blush, #f3cfd3), color-mix(in srgb, var(--mocha, #a47864) 55%, var(--sheet))); color: var(--muted); font-size: .875rem; font-weight: 600; }
.c-steps-list { display: grid; gap: 8px; padding-left: 20px; list-style: decimal; font-size: .9375rem; line-height: 1.45; }
.c-mday .c-h2 { font-size: 1.125rem; }
.c-mday small { color: var(--muted); font-size: .8125rem; }
.c-mlist li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--hair); }
.c-mlist li:first-child { border-top: 0; }
.c-mlist a { color: inherit; font-weight: 600; font-size: .9375rem; text-underline-offset: 3px; }
.c-mbtns { display: grid; gap: 4px; flex: none; }
.c-chip-btn { min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--stone); color: var(--ink); font: 600 .75rem var(--f-text); cursor: pointer; }
.c-shop li label { display: flex; align-items: center; gap: 12px; min-height: 44px; border-top: 1px solid var(--hair); cursor: pointer; }
.c-shop li:first-child label { border-top: 0; }
.c-shop input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.c-shop span { flex: 1; }
.c-shop input:checked ~ span, .c-shop input:checked ~ b { text-decoration: line-through; opacity: .55; }

/* Фото «до и после» */
.c-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.c-ph { display: grid; gap: 4px; text-align: center; cursor: pointer; }
.c-ph-img { aspect-ratio: 3 / 4; border-radius: 14px; background: var(--stone) center / cover no-repeat; box-shadow: inset 0 0 0 1px var(--hair-strong); display: grid; place-items: center; }
.c-ph-img:not(.has)::after { content: "+"; font-size: 1.75rem; color: var(--muted); }
.c-ph small { font-size: .75rem; font-weight: 600; color: var(--muted); }
.c-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.c-compare figure { margin: 0; }
.c-compare img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; }
.c-compare figcaption { margin-top: 4px; font-size: .8125rem; font-weight: 700; text-align: center; }

/* Перенесённые блоки старого кабинета внутри новых экранов */
.c-page .video { border-radius: 18px; }
.c-page .quests { margin-top: 12px; }
.c-plan h1 { margin-top: 2px; }

@media (min-width: 900px) {
  .c-tabs { bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .c-sheet, .c-sheet-bg, .c-timer, .c-ring .r-fg { transition: none; animation: none; }
}

/* Свои номера вместо стандартных маркеров списков */
.c-wlist, .c-exlist, .c-cues, .c-chapters, .c-lib, .c-recipes, .c-flist, .c-mlist, .c-shop, .c-list, .c-facts { list-style: none; margin: 0; padding-left: 0; }
.c-exlist { padding: 4px 16px; }
.c-lib, .c-flist { padding: 4px 16px; }

/* Лист поверх панели кнопок и тёмный экран тренировки */
body.has-bar .c-sheet, html.tg .c-sheet { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
body.c-dark .cab-bar .btn.quiet, body.c-dark .tg-second { background: rgba(246, 229, 220, .14); color: #f6e5dc; box-shadow: inset 0 0 0 1px rgba(246, 229, 220, .22); }


.c-page span.bar { display: block; }
.c-glasses { display: grid; grid-template-columns: repeat(auto-fill, minmax(28px, 1fr)); gap: 2px; }
.c-glass-btn { width: 100%; }

/* Зал или дом — переключатель в бордовой карточке */
.c-seg-dark { background: rgba(246, 229, 220, .12); }
.c-seg-dark > * { color: rgba(246, 229, 220, .78); min-height: 44px; }
.c-seg-dark > [aria-checked="true"] { background: #fcf8f4; color: #7b1e34; box-shadow: none; }

/* Видео Bunny: плеер занимает всю рамку; надпись «появится после съёмки» и метка скрываются, номер заказа остаётся поверх */
.c-vid iframe, .c-page .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 2; }
.c-vid.has-video > p, .c-vid.has-video > .c-vid-tag, .video.has-video > p { display: none; }
.c-vid.has-video .c-wm, .c-vid.has-video .c-vid-tech { z-index: 3; }
.c-vid.has-video { padding: 0; background: #000; }

/* Заставка приветствия Кумуш: на телефоне — лёгкая версия фото (24 КБ), на широком экране — 800 px */
.c-welcome { background-image: url(../assets/photos/portrait-floral-480.webp); background-image: image-set(url(../assets/photos/portrait-floral-480.webp) type('image/webp'), url(../assets/photos/portrait-floral.jpg) type('image/jpeg')); }
@media (min-width: 700px) { .c-welcome { background-image: image-set(url(../assets/photos/portrait-floral-800.webp) type('image/webp'), url(../assets/photos/portrait-floral.jpg) type('image/jpeg')); } }

/* ---------- Чат с ИИ-тренером ---------- */
.c-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.c-chat-log { display: flex; flex-direction: column; gap: 10px; }
.c-msg { max-width: 86%; padding: 10px 14px 8px; border-radius: 18px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.c-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-msg small { display: block; font-weight: 700; font-size: .75rem; letter-spacing: .02em; opacity: .72; margin-bottom: 2px; }
.c-msg time { display: block; font-size: .6875rem; opacity: .55; margin-top: 4px; text-align: right; }
.c-msg.me { align-self: flex-end; background: #7b1e34; color: #fcf8f4; border-bottom-right-radius: 6px; }
.c-msg.ai, .c-msg.op, .c-msg.bot { align-self: flex-start; border-bottom-left-radius: 6px; }
.c-msg.op { background: color-mix(in srgb, #b8860b 16%, transparent); }
.c-typing { display: inline-flex; align-items: center; gap: 4px; }
.c-typing span { opacity: .7; margin-right: 4px; }
.c-typing i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .35; animation: c-dot 1.2s infinite ease-in-out; }
.c-typing i:nth-of-type(2) { animation-delay: .15s; } .c-typing i:nth-of-type(3) { animation-delay: .3s; }
@keyframes c-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: .9; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .c-typing i { animation: none; } }
.c-chat-form { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 8px; align-items: flex-end; margin-top: 16px; padding: 8px; border-radius: 22px; background: var(--sheet); box-shadow: 0 6px 24px rgba(0, 0, 0, .08); }
.c-chat-form textarea { flex: 1; min-height: 44px; max-height: 160px; resize: vertical; border: 0; background: transparent; font: inherit; color: inherit; padding: 10px 12px; }
.c-chat-form textarea:focus-visible { outline: 2px solid #7b1e34; outline-offset: 0; border-radius: 14px; }
.c-chat-form .btn { flex: none; }
body.c-dark .c-chat-form { background: #2a1016; }
/* Кнопка «Отправить» в чате — сплошная, как основная кнопка; бледная только пока ответ пишется */
.c-chat-form .btn { background: #7b1e34; color: #fcf8f4; box-shadow: none; }
.c-chat-form .btn:disabled { opacity: .55; }

/* Значки разминки и заминки в списках упражнений */
.c-wn svg, .c-chapters span svg { width: 18px; height: 18px; }
.c-ex-aux .c-wn { color: var(--accent); }

/* «Я»: раскрывающиеся списки и строки вместо карточек в карточках */
.c-more > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; list-style: none; font-weight: 600; color: var(--accent); }
.c-more > summary::-webkit-details-marker { display: none; }
.c-more > summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; flex: none; }
.c-more[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.c-q-now { display: grid; gap: 2px; }
.c-q-now small { color: var(--muted); }
.c-page .quests { gap: 0; }
.c-page .quest, .c-page .quest.ok { background: none; color: inherit; border-radius: 0; padding: 12px 0; border-top: 1px solid var(--hair); }
.c-page .sheet .stack { gap: 0; }
.c-page .sheet .stack > .tile { background: none; color: inherit; border-radius: 0; padding: 12px 0; border-top: 1px solid var(--hair); box-shadow: none; }

/* Программа А/Б: фаза недели, суперсеты в списке упражнений, стартовые веса */
.c-phase { font: 500 .8125rem var(--f-text); color: var(--muted); letter-spacing: 0; }
.c-exlist li.c-ss > a { box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }
.c-starts li { align-items: flex-start; }
.c-start { display: grid; justify-items: end; text-align: right; gap: 2px; font-weight: 600; max-width: 48%; }
.c-start small { font-weight: 400; color: var(--muted); }
