@import url(/core/fonts.css);

/* Токены переопределяются вариантом — на этом же механизме потом будут свои цвета. */
:root {
  --bg: #efe7d6; --surface: #f7f1e4; --surface-2: #e5dbc5; --ink: #1b3327; --ink-2: #55665a; --line: #cfc3a9;
  --accent: #1f4a36; --accent-ink: #f7f1e4; --done: #d6e0cb; --pr: #8a5c10; --danger: #8c2f24;
  --font-body: 'Golos', -apple-system, system-ui, sans-serif; --font-head: var(--font-body); --font-num: var(--font-body);
  --r: 12px; --gutter: 16px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.4 var(--font-body); overscroll-behavior-y: none; min-height: 100dvh; }
body.locked { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.empty { padding: 28px 0; text-align: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 8px; }

/* кнопки и поля */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 18px; border-radius: var(--r); background: var(--surface-2); font-weight: 600; width: 100%; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px var(--danger); }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink-2); flex: none; }
.field { width: 100%; min-height: 50px; padding: 0 14px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line); font-size: 16px; }
.field:focus { outline: none; border-color: var(--accent); }
select.field { appearance: none; -webkit-appearance: none; }

/* шторка */
.sheet-root { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-backdrop { position: absolute; inset: 0; background: rgb(8 20 14 / .55); animation: fade .16s ease-out; }
.sheet { position: relative; max-height: calc(100dvh - var(--safe-t) - 28px); display: flex; flex-direction: column; background: var(--bg); border-radius: 18px 18px 0 0; animation: rise .2s cubic-bezier(.2, .8, .3, 1); }
.sheet-root.closing .sheet { transform: translateY(100%); transition: transform .16s ease-in; }
.sheet-root.closing .sheet-backdrop { opacity: 0; transition: opacity .16s; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 6px 4px 18px; flex: none; }
.sheet-head h2 { font: 600 20px/1.2 var(--font-head); }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px var(--gutter) calc(20px + var(--safe-b)); overscroll-behavior: contain; }
@keyframes rise { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }

/* меню и выбор */
.menu { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); overflow: hidden; }
.menu-row { display: flex; flex-direction: column; justify-content: center; gap: 1px; width: 100%; min-height: 52px; padding: 8px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.menu-row:last-child { border-bottom: 0; }
.menu-row.danger { color: var(--danger); }
.menu-row small { color: var(--ink-2); font-size: 14px; }
.menu-row b { font-weight: 600; }
.menu-row.radio { padding-left: 42px; position: relative; }
.menu-row.radio::before { content: ''; position: absolute; left: 14px; top: 50%; margin-top: -9px; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.menu-row.radio.on::before { box-shadow: inset 0 0 0 6px var(--accent); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 8px 14px; background: var(--surface); border-radius: var(--r); }
.toggle-row input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 38px; padding: 0 14px; border-radius: 19px; background: var(--surface-2); font-size: 15px; white-space: nowrap; }
.chip.on { background: var(--accent); color: var(--accent-ink); }

.pick { display: flex; flex-direction: column; gap: 10px; }
.pick-list { display: flex; flex-direction: column; min-height: 40vh; }
.pick-group { font: 600 13px/1 var(--font-body); color: var(--ink-2); margin: 12px 0 4px; letter-spacing: .02em; }
.pick-row { display: flex; flex-direction: column; gap: 1px; min-height: 56px; justify-content: center; text-align: left; border-bottom: 1px solid var(--line); padding: 6px 2px; }
.pick-row.is-picked { background: var(--done); margin: 0 -8px; padding: 6px 10px; border-radius: 8px; }
.pick-name { font-weight: 600; }
.pick-muscle { color: var(--ink-2); font-size: 14px; }
.pick-empty { padding: 18px 0 6px; }
.pick-create { margin-top: 14px; }
.pick-confirm { position: sticky; bottom: 0; }

/* таблица подходов */
.set-table { font-family: var(--font-num); }
/* [галочки] с галочками в конце строки была колонка 48px:
.set-row { grid-template-columns: 32px minmax(58px, 1fr) repeat(var(--cols), minmax(58px, 1fr)) 48px; }
[галочки] */
.set-row { display: grid; grid-template-columns: 32px minmax(64px, 1fr) repeat(var(--cols), minmax(64px, 1.2fr)); align-items: center; gap: 6px; min-height: 52px; border-radius: 8px; transition: background .15s; }
.set-head { min-height: 26px; font: 500 13px/1 var(--font-body); color: var(--ink-2); text-align: center; }
.set-num { height: 44px; color: var(--ink-2); font-size: 15px; }
.set-prev { color: var(--ink-2); font-size: 14px; text-align: center; white-space: nowrap; overflow: hidden; }
button.set-prev { height: 40px; border-radius: 8px; background: var(--surface-2); font-family: var(--font-num); }
button.set-prev:active { background: var(--accent); color: var(--accent-ink); }
.set-row.is-done button.set-prev { background: transparent; }
.cell-input { width: 100%; min-width: 0; height: 44px; text-align: center; background: var(--surface); border: 1.5px solid var(--line); border-radius: 8px; font-family: var(--font-num); font-size: 18px; font-weight: 500; }
.cell-input:focus { outline: none; border-color: var(--accent); }
.cell-input::placeholder { color: var(--ink-2); opacity: .55; font-weight: 400; }
.set-row.is-done { background: var(--done); }
.set-row.is-done .cell-input { background: transparent; border-color: transparent; }
/* [галочки]
.set-check { width: 48px; height: 44px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.set-row.is-done .set-check { background: var(--accent); color: var(--accent-ink); }
[галочки] */
.set-row.is-warm .set-num { font-style: italic; }
.set-add { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; color: var(--ink-2); font-family: var(--font-body); font-size: 15px; }

/* степпер */
.stepper { display: grid; grid-template-columns: 64px 1fr 64px; align-items: stretch; gap: 8px; }
.stp-btn { display: grid; place-items: center; min-height: 64px; background: var(--surface-2); border-radius: var(--r); }
.stp-btn:active { background: var(--accent); color: var(--accent-ink); }
.stp-center { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stp-value { width: 100%; text-align: center; background: none; border: 0; font: 600 34px/1.1 var(--font-num); padding: 0; }
.stp-value:focus { outline: none; }
.stp-unit { font-size: 14px; color: var(--ink-2); }

/* таймер */
.timer-bar { position: fixed; left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); z-index: 30; display: none; align-items: center; gap: 4px; height: 58px; padding: 0 6px 0 16px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); overflow: hidden; box-shadow: 0 8px 24px rgb(8 20 14 / .3); }
.timer-bar.on { display: flex; }
body:has(.a-nav) .timer-bar, body:has(.c-tabs) .timer-bar { bottom: calc(68px + var(--safe-b)); }
.tb-fill { position: absolute; inset: 0; background: rgb(255 255 255 / .12); transform-origin: left; pointer-events: none; }
.tb-label { font-size: 14px; opacity: .85; position: relative; }
.tb-time { font: 600 24px/1 var(--font-num); margin: 0 auto 0 10px; position: relative; font-variant-numeric: tabular-nums; }
.tb-btn { position: relative; min-width: 46px; height: 44px; display: grid; place-items: center; font-weight: 600; font-size: 15px; }

/* статус и тосты */
.sync-badge { display: none; font-size: 13px; color: var(--ink-2); }
.sync-badge.on { display: inline; }
.toast { position: fixed; left: 50%; top: calc(14px + var(--safe-t)); transform: translateX(-50%); z-index: 90; background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 22px; font-weight: 600; font-size: 15px; white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; animation: fade .15s; }
.toast.pr { background: var(--pr); color: #fff8e8; }

/* графики */
.chart { position: relative; min-height: 210px; }
.chart svg { display: block; touch-action: pan-y; }
.chart-empty { display: grid; place-items: center; text-align: center; color: var(--ink-2); padding: 0 24px; background: var(--surface); border-radius: var(--r); }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-label { fill: var(--ink-2); font: 400 12px var(--font-body); }
.ch-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-area { fill: var(--accent); opacity: .08; }
.ch-dot { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
.ch-cross { stroke: var(--ink-2); stroke-width: 1; }
.ch-tick { stroke: var(--ink-2); stroke-width: 1; opacity: .5; }
.ch-value { fill: var(--ink); font: 600 13px var(--font-body); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.chart-tip { position: absolute; top: -6px; left: 0; display: none; gap: 8px; align-items: baseline; padding: 5px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 14px; white-space: nowrap; pointer-events: none; z-index: 2; }
.chart-tip.on { display: flex; }
.spark { flex: none; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-dot { fill: var(--accent); }

/* история и прогресс */
.stat-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 14px; background: var(--surface); border-radius: var(--r); font-size: 15px; }
.stat-line b { font: 600 20px/1 var(--font-num); white-space: nowrap; }
.hist-row { display: grid; grid-template-columns: 64px 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.hist-date { color: var(--ink-2); }
.hist-sets { font-family: var(--font-num); word-spacing: .15em; }
.prog-list { display: flex; flex-direction: column; }
.prog-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 8px 0; text-align: left; border-bottom: 1px solid var(--line); }
.prog-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.prog-main b { font-weight: 600; line-height: 1.25; }
.prog-main small { color: var(--ink-2); font-size: 14px; }
.prog-delta { display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; width: 62px; font: 500 15px/1 var(--font-num); color: var(--ink-2); flex: none; }
.prog-delta.good { color: var(--accent); }

.summary-lead { font: 600 22px/1.2 var(--font-head); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-grid > div { display: flex; flex-direction: column; gap: 2px; padding: 14px; background: var(--surface); border-radius: var(--r); }
.stat-grid b { font: 600 30px/1 var(--font-num); }
.stat-grid span { color: var(--ink-2); font-size: 14px; }
.stat-grid .is-pr b { color: var(--pr); }

/* редактор программ */
.rt-item { background: var(--surface); padding: 8px 6px 12px 14px; border-radius: var(--r); }
.rt-head { display: flex; align-items: center; gap: 2px; }
.rt-head b { flex: 1; font-weight: 600; }
.rt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-right: 8px; }
.mini span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 3px; }

/* страница записи */
.wp { max-width: 560px; margin: 0 auto; padding: var(--safe-t) var(--gutter) calc(96px + var(--safe-b)); }
.wp-top { display: flex; align-items: center; gap: 2px; margin: 4px 0 0 -10px; min-height: 48px; }
.wp-date { font-size: 15px; color: var(--ink-2); min-height: 44px; padding: 0 4px; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }
.wp-top .sync-badge { margin-left: auto; }
.wp-title { width: 100%; background: none; border: 0; border-bottom: 1.5px solid var(--line); padding: 6px 0 10px; font: 600 26px/1.2 var(--font-head); border-radius: 0; }
.wp-title:focus { outline: none; border-color: var(--accent); }
.wp-title::placeholder { color: var(--ink-2); opacity: .6; }
.wp-ex { padding: 16px 0 6px; border-bottom: 1.5px solid var(--line); }
.wp-ex-head { display: flex; align-items: center; justify-content: space-between; margin-right: -8px; }
.wp-ex-name { font-weight: 600; font-size: 18px; text-align: left; min-height: 44px; }
.wp-note { color: var(--ink-2); font-size: 14px; margin: -4px 0 6px; }
.wp-foot { padding-top: 16px; }

.btn:disabled { opacity: .6; }

/* мои тренировки */
.tp { display: flex; flex-direction: column; gap: 10px; }
.tp-list { display: flex; flex-direction: column; gap: 8px; }
.tp-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; background: var(--surface); border-radius: 14px; padding: 4px 8px 4px 14px; }
.tp-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 0; text-align: left; }
.tp-main b { font: 600 19px/1.2 var(--font-head); }
.tp-main small { font-size: 14px; color: var(--ink-2); }
.tp-ex { font-size: 14px; line-height: 1.35; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tp-actions { display: flex; flex-direction: column; align-items: center; gap: 0; }
.tp-start { width: auto; min-height: 44px; padding: 0 16px; }
.tp-empty { padding: 2px 0 4px; }
.tp-lib { margin-top: 18px; }
.tp-preset { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 14px; text-align: left; background: var(--surface); border-radius: 14px; }
.tp-preset b { font-weight: 600; font-size: 17px; }
.tp-preset span { color: var(--ink-2); font-size: 15px; line-height: 1.35; }
.tp-preset small { color: var(--ink-2); font-size: 13px; }
.ps-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--surface); border-radius: 12px; }
.ps-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ps-head b { font-weight: 600; font-size: 17px; }
.ps-head small { color: var(--ink-2); font-size: 14px; }
.ps-list { margin: 0; padding-left: 22px; font-size: 15px; line-height: 1.45; }
.ps-card .btn { min-height: 46px; }

/* конструктор тренировки */
.te { max-width: 560px; margin: 0 auto; padding: var(--safe-t) var(--gutter) calc(32px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; }
.te-top { display: flex; align-items: center; gap: 2px; min-height: 48px; margin: 4px 0 -6px -10px; color: var(--ink-2); font-size: 15px; }
.te-top .sync-badge { margin-left: auto; }
.te-name { width: 100%; background: none; border: 0; border-bottom: 1.5px solid var(--line); border-radius: 0; padding: 6px 0 10px; font: 600 28px/1.2 var(--font-head); }
.te-name:focus { outline: none; border-color: var(--accent); }
.te-name::placeholder { color: var(--ink-2); opacity: .6; }
.te-label { font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.te-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.te-day { min-height: 44px; border-radius: 10px; background: var(--surface-2); font-size: 15px; }
.te-day.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.te-ex { padding: 4px 4px 14px 12px; background: var(--surface); border-radius: 14px; }
.te-ex-head { display: flex; align-items: center; gap: 8px; }
.te-n { flex: none; width: 20px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.te-ex-head b { flex: 1; font-weight: 600; line-height: 1.25; }
.te-params { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 18px; padding: 2px 8px 0 28px; }
.te-field > span { display: block; margin-bottom: 5px; font-size: 13px; color: var(--ink-2); }
.te-sets { display: flex; align-items: center; gap: 4px; }
.te-sets button { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--surface-2); }
.te-sets b { min-width: 30px; text-align: center; font: 600 19px/1 var(--font-num); }
.te-reps { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.te-reps .cell-input { width: 58px; height: 42px; }
.te-mode { padding-bottom: 11px; font-size: 14px; color: var(--ink-2); }
.te-foot { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }

/* выбор тренировки при старте */
.ch-list { display: flex; flex-direction: column; gap: 6px; }
.ch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 64px; padding: 10px 12px 10px 14px; text-align: left; background: var(--surface); border-radius: 12px; }
.ch-row b { display: block; font-weight: 600; font-size: 18px; line-height: 1.2; }
.ch-row small { display: block; margin-top: 2px; color: var(--ink-2); font-size: 14px; }
.ch-row.is-today { background: var(--accent); color: var(--accent-ink); }
.ch-row.is-today small { color: inherit; opacity: .8; }
.ch-kicker { display: block; margin-bottom: 3px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.ch-more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ch-date { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 14px; background: var(--surface); border-radius: 12px; color: var(--ink-2); font-size: 15px; }
.ch-date input { min-width: 0; background: none; border: 0; color: var(--ink); font: 600 16px var(--font-body); text-align: right; }

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

/* история по датам и последний результат */
.hist-row { grid-template-columns: max-content 1fr; column-gap: 16px; align-items: baseline; }
.hist-date { font-family: var(--font-num); font-size: 15px; color: var(--ink); }
.hist-date small { margin-left: 6px; font-family: var(--font-body); font-size: 13px; color: var(--ink-2); }
.hist-sets { font-weight: 500; }
.hist-more { min-height: 44px; color: var(--ink-2); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.te-ex-name { flex: 1; text-align: left; font-weight: 600; line-height: 1.25; min-height: 44px; }
.te-last { display: flex; align-items: center; gap: 8px; width: calc(100% - 28px); margin: 0 0 6px 28px; padding: 8px 10px; border-radius: 10px; background: var(--bg); font-size: 14px; color: var(--ink-2); text-align: left; }
.te-last b { flex: 1; color: var(--ink); font: 500 15px/1.3 var(--font-num); }
p.te-last { background: none; padding: 0 10px 4px; }

/* перенос из заметок */
.imp-h1 { font: 600 28px/1.15 var(--font-head); }
.imp-text { width: 100%; min-height: 220px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font: 400 16px/1.5 var(--font-num); resize: vertical; }
.imp-text:focus { outline: none; border-color: var(--accent); }
.imp-map { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; padding: 10px 14px; text-align: left; background: var(--surface); border-radius: 12px; }
.imp-raw { font-size: 14px; color: var(--ink-2); }
.imp-raw::after { content: ' →'; }
.imp-to { grid-column: 1; font-weight: 600; }
.imp-map small { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--ink-2); font-size: 13px; text-decoration: underline; }
.imp-map.is-new .imp-to { color: var(--pr); }
.imp-card { padding: 8px 8px 12px 14px; background: var(--surface); border-radius: 12px; }
.imp-card.is-dup { opacity: .55; }
.imp-card-head { display: flex; align-items: center; justify-content: space-between; }
.imp-card-head input { min-height: 44px; background: none; border: 0; font: 600 18px var(--font-body); color: var(--ink); }
.imp-note { font-size: 13px; color: var(--ink-2); margin: -2px 0 6px; }
.imp-note.warn { color: var(--pr); }
.imp-line { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 6px 6px 6px 0; border-top: 1px solid var(--line); font-size: 15px; }
.imp-line b { font: 500 15px/1.35 var(--font-num); text-align: right; }
.imp-skipped { padding: 10px 14px; background: var(--surface); border-radius: 12px; font-size: 15px; }
.imp-skipped summary { cursor: pointer; color: var(--pr); }
.imp-skipped ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-family: var(--font-num); font-size: 14px; }
.imp-help { padding: 12px 14px; background: var(--surface); border-radius: 12px; font-size: 15px; }
.imp-help summary { cursor: pointer; font-weight: 600; min-height: 28px; }
.imp-help dl { margin: 10px 0 8px; display: grid; gap: 8px; }
.imp-help dt { font-size: 13px; color: var(--ink-2); }
.imp-help dd { margin: 0; font: 400 14px/1.45 var(--font-num); }
.imp-line small { font: 400 13px var(--font-body); color: var(--ink-2); }
.wp-top .wp-more { margin-left: auto; margin-right: -10px; }
.wp-top .sync-badge { margin-left: auto; }
.wp-top .sync-badge.on + .wp-more { margin-left: 4px; }
.wp-empty { padding: 18px 0 4px; }
.ch-link { min-height: 44px; color: var(--ink-2); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.ch-row small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70vw; }
.link-code { text-align: center; font: 600 44px/1.1 var(--font-num); letter-spacing: .08em; padding: 18px 0 6px; }

/* знакомство после регистрации */
.ob { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: var(--bg); padding: var(--safe-t) 0 var(--safe-b); animation: fade .2s; }
.ob.closing { opacity: 0; transition: opacity .2s; }
.ob-top { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 var(--gutter); }
.ob-top b { font: 600 18px/1 var(--font-head); }
.ob-skip { min-height: 44px; padding: 0 4px; color: var(--ink-2); font-size: 15px; }
.ob-track { flex: 1; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ob-track::-webkit-scrollbar { display: none; }
.ob-slide { flex: 0 0 100%; scroll-snap-align: start; display: flex; flex-direction: column; gap: 12px; padding: 8px var(--gutter) 12px; overflow-y: auto; max-width: 100%; }
.ob-slide h2 { font: 600 28px/1.15 var(--font-head); margin-top: 8px; }
.ob-slide p { color: var(--ink-2); font-size: 17px; line-height: 1.45; }
.ob-action { margin-top: 4px; }
.ob-foot { display: flex; align-items: center; gap: 16px; padding: 10px var(--gutter) 14px; }
.ob-dots { display: flex; gap: 6px; flex: 1; }
.ob-dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--line); transition: width .2s, background .2s; }
.ob-dots i.on { width: 22px; background: var(--accent); }
.ob-next { width: auto; min-width: 140px; }

.ob-art { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); min-height: 210px; justify-content: center; }
.ob-art-title { font: 600 18px/1.2 var(--font-head); color: var(--ink) !important; font-size: 18px !important; }
.ob-art-note { display: flex; align-items: center; gap: 6px; font-size: 14px !important; color: var(--ink-2); }
.ob-row { display: grid; grid-template-columns: 24px 1fr 1fr 1fr; align-items: center; gap: 6px; min-height: 40px; border-radius: 8px; font: 500 17px/1 var(--font-num); text-align: center; }
.ob-row.on { background: var(--done); }
.ob-head { min-height: 22px; font: 500 12px/1 var(--font-body); color: var(--ink-2); }
.ob-row span:first-child { color: var(--ink-2); font-size: 14px; }
.ob-prev { font-size: 14px; color: var(--ink-2); }
.ob-prev.tap { padding: 8px 0; border-radius: 8px; background: var(--surface-2); box-shadow: 0 0 0 2px var(--accent); }
.ob-row .hint { color: var(--ink-2); opacity: .55; font-weight: 400; }
.ob-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: var(--bg); }
.ob-card b { font: 600 20px/1.2 var(--font-head); }
.ob-card span { font-size: 14px; color: var(--ink-2); line-height: 1.35; }
.ob-card i { align-self: flex-start; margin-top: 6px; padding: 8px 16px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font: 600 15px/1 var(--font-body); font-style: normal; }
.ob-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: 15px; }
.ob-line b { font-weight: 600; }
.ob-new { justify-content: flex-start; background: var(--done); }
.ob-menu { display: flex; flex-direction: column; margin-left: 24px; border-radius: 10px; overflow: hidden; background: var(--bg); font-size: 14px; }
.ob-menu span { padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.ob-menu span:last-child { border-bottom: 0; }
.ob-menu span.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.ob-notes { margin: 0; padding: 12px; border-radius: 10px; background: var(--bg); font: 400 15px/1.5 var(--font-num); color: var(--ink); white-space: pre-wrap; }
.ob-arrow { display: grid; place-items: center; color: var(--ink-2); }
.ob-line b:last-child { font: 500 15px/1 var(--font-num); }
.ob-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ob-cal span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; font: 500 14px/1 var(--font-num); color: var(--ink-2); }
.ob-cal span.on { background: var(--accent); color: var(--accent-ink); }
.ob-spark { width: 80px; height: 24px; }
.ob-spark path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ob-spark circle { fill: var(--accent); }
.ob-new b { font: 600 15px/1.2 var(--font-body) !important; }

/* каталог: плавающая «+ Своё упражнение» */
.pick-foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 10px 0 2px; pointer-events: none; }
.pick-foot > * { pointer-events: auto; }
.pick-foot .pick-confirm { flex: 1; min-height: 56px; box-shadow: 0 6px 20px rgb(20 40 30 / .22); }
.pick-fab { display: inline-flex; align-items: center; gap: 6px; min-height: 56px; padding: 0 20px 0 16px; border-radius: 28px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 16px; box-shadow: 0 6px 20px rgb(20 40 30 / .28); white-space: nowrap; }
.pick-foot.has-confirm .pick-fab { background: var(--surface-2); color: var(--ink); padding: 0 16px; }
.pick-list { padding-bottom: 8px; }

/* уведомление с кнопкой — снизу, над меню */
.toast.toast-bottom { top: auto; bottom: calc(84px + var(--safe-b)); display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 18px; }
.toast-act { min-height: 36px; padding: 0 14px; border-radius: 18px; background: var(--bg); color: var(--ink); font-weight: 600; }
.l-err-inline { color: var(--danger); }

/* ───── журнал и календарь всех интерфейсов ───── */
/* Цвета тегов: 8 оттенков проверены скриптом dataviz на бежевом фоне, у тёмного «Фокуса» свои ступени. */
:root {
  --tag-green: #008300; --tag-blue: #2a78d6; --tag-magenta: #e87ba4; --tag-yellow: #eda100;
  --tag-orange: #eb6834; --tag-aqua: #1baf7a; --tag-violet: #6250d6; --tag-red: #e34948; --tag-gray: #8a8577;
  --tag-accent: var(--accent); /* зал — цвет приложения */
}
.v-month { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 22px 2px 10px; font: 600 15px/1.2 var(--font-head); color: var(--ink); }
.v-month span { display: inline-block; }
.v-month span::first-letter { text-transform: uppercase; }
.v-month small { font: 500 13px/1 var(--font-num); color: var(--ink-2); white-space: nowrap; }
.v-swipe { position: relative; overflow: hidden; margin-bottom: 8px; border-radius: 14px; }
.v-entry { position: relative; z-index: 1; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; width: 100%; padding: 14px 14px 14px 18px; text-align: left; background: var(--surface); border-radius: 14px; transition: transform .2s ease; }
.v-entry::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--tag, var(--accent)); }
.v-entry-date { padding-top: 1px; }
.v-entry-date b { display: block; font: 600 24px/1 var(--font-num); font-variant-numeric: tabular-nums; }
.v-entry-date span { display: block; margin-top: 5px; font: 600 11px/1 var(--font-body); color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.v-entry-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.v-entry h3 { display: flex; align-items: center; gap: 8px; min-width: 0; font: 600 17px/1.25 var(--font-head); }
.v-h-sw { flex: none; width: 12px; height: 12px; border-radius: 4px; background: var(--tag); }
.v-meta { margin-top: 3px; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.v-exs { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.v-ex { display: contents; }
.v-ex span { font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.v-ex b { max-width: 200px; font: 500 14px/1.35 var(--font-num); font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
.v-more { margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.v-stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin-top: 6px; font: 500 14px/1.3 var(--font-num); color: var(--ink-2); }
.v-stats .lead { font-size: 16px; font-weight: 600; color: var(--ink); }
.v-note { margin-top: 8px; font-size: 14px; line-height: 1.4; color: var(--ink-2); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tag { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 24px; padding: 0 9px 0 8px; border-radius: 12px; background: var(--bg); font: 500 12px/1 var(--font-body); color: var(--ink); white-space: nowrap; }
.tag i { width: 10px; height: 10px; border-radius: 3px; background: var(--tag); }
.v-swipe-del { position: absolute; top: 0; right: 0; bottom: 0; width: 96px; background: var(--danger); color: #fff8ef; font-weight: 600; font-size: 15px; }
.v-filters { margin-top: 4px; }
.v-filter, .v-leg { display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 38px; padding: 0 13px; border-radius: 19px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; color: var(--ink); white-space: nowrap; }
.v-filter i, .v-leg i { width: 12px; height: 12px; border-radius: 4px; background: var(--tag); }
.v-filter small, .v-leg small { font: 500 13px/1 var(--font-num); color: var(--ink-2); }
.v-filter.on, .v-leg.on { box-shadow: inset 0 0 0 2px var(--ink); font-weight: 600; }
.v-leg.dim { opacity: .55; }
.v-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.v-empty { padding: 24px 0; }
.v-empty p { color: var(--ink-2); line-height: 1.45; margin-bottom: 8px; }
.v-link { min-height: 44px; color: var(--ink-2); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.v-cal-head { display: flex; align-items: center; justify-content: space-between; margin: 4px -10px 0; }
.v-cal-head b { font: 600 20px/1.2 var(--font-head); }
.v-cal-head .icon-btn:disabled { opacity: .3; }
.v-cal-sum { color: var(--ink-2); font-size: 15px; margin: 2px 0 12px; }
.v-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.v-cal-wd { text-align: center; font: 400 13px/1 var(--font-num); color: var(--ink-2); padding: 6px 0; }
.v-cal-cell { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; font: 500 16px/1 var(--font-num); color: var(--ink); }
.v-cal-cell.out { opacity: .45; }
.v-cal-cell:disabled { opacity: .35; }
.v-cal-cell.has { font-weight: 700; }
.v-cal-cell.today { box-shadow: inset 0 0 0 2px var(--accent); }
.v-cal-cell.has.today { box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 0 4px var(--bg); }
.v-cal-cell.sel { outline: 2px solid var(--ink); outline-offset: 2px; }
.v-cal-cell i { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--ink); color: var(--bg); font: 600 11px/18px var(--font-body); font-style: normal; }
.v-cal-day { margin-top: 10px; }
.v-cal-none { padding: 18px 0; text-align: center; font-size: 15px; }

/* ───── завершённая тренировка ───── */
.wv-date { font-size: 15px; color: var(--ink-2); padding: 0 4px; }
.wv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 6px 0 4px; }
.wv-title { font: 600 26px/1.2 var(--font-head); }
.wv-head .tag { margin-top: 6px; background: var(--surface); }
.wv-stats { display: grid; gap: 6px; margin: 12px 0 4px; }
.wv-stats > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.wv-stats b { font: 600 19px/1.1 var(--font-body); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wv-stats span { font-size: 13px; color: var(--ink-2); }
.wv-pr { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--pr); }
.wv-note { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); font-size: 15px; line-height: 1.4; white-space: pre-line; }
.wv-ex { margin-top: 10px; padding: 4px 14px 10px; border-radius: 14px; background: var(--surface); }
.wv-ex-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; text-align: left; font-size: 17px; }
.wv-ex-name svg { flex: none; color: var(--ink-2); }
.wv-comment { margin: -2px 0 8px; padding-left: 10px; border-left: 2px solid var(--line); font-size: 14px; line-height: 1.4; color: var(--ink-2); white-space: pre-line; }
.wv-sets { width: 100%; border-collapse: collapse; table-layout: fixed; }
.wv-sets th { padding: 2px 0 6px; font: 400 12px/1 var(--font-body); color: var(--ink-2); text-align: left; }
.wv-sets th:first-child, .wv-sets td:first-child { width: 30px; }
.wv-sets th:last-child, .wv-sets td.mark { width: 42%; }
.wv-sets td { padding: 8px 0; border-top: 1px solid var(--line); vertical-align: baseline; }
.wv-sets td:first-child { font: 500 13px/1 var(--font-num); color: var(--ink-2); }
.wv-sets td.v { font: 600 17px/1.2 var(--font-num); font-variant-numeric: tabular-nums; }
.wv-sets tr.warm td.v { font-weight: 500; color: var(--ink-2); }
.wv-sets td.mark { text-align: right; }
.wv-sets td.mark em, .wv-sets td.mark small { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-style: normal; color: var(--ink-2); }
.wv-sets td.mark em { font-weight: 600; color: var(--pr); }
.wv { overflow-x: clip; }
.wp-comment { display: block; width: 100%; margin: -2px 0 8px; padding: 2px 0 2px 10px; border-left: 2px solid var(--line); text-align: left; font-size: 14px; line-height: 1.4; color: var(--ink-2); white-space: pre-line; }
.hist-note { grid-column: 2; margin-top: -2px; font-size: 14px; line-height: 1.35; color: var(--ink-2); white-space: pre-line; }
.hist-keep { padding: 10px 12px; border-radius: 12px; background: var(--surface); font-size: 14px; color: var(--ink-2); }
.cm-list { display: flex; flex-direction: column; }
.cm-row { display: grid; grid-template-columns: max-content 1fr; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cm-row p { font-size: 15px; line-height: 1.4; white-space: pre-line; }
input[type="date"] { min-width: 0; max-width: 100%; -webkit-appearance: none; appearance: none; }
.ch-date input[type="date"] { flex: 0 1 auto; }

/* ───── другие тренировки: форма и цвета ───── */
.act-types { display: flex; flex-wrap: wrap; gap: 8px; }
.act-chip { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px 0 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.act-chip i { width: 12px; height: 12px; border-radius: 4px; background: var(--tag); }
.act-chip i.none, .tag-sw.none { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.act-chip.on { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.act-chip.on i { box-shadow: 0 0 0 2px var(--accent-ink); }
.act-new { color: var(--ink-2); }
.act-add { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface); }
.act-add[hidden] { display: none; }
.act-hint { margin-top: -4px; }
.act-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.act-field { display: block; }
.act-field[hidden] { display: none; }
.act-durs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.act-durs .chip { padding: 0 4px; }
.act-note { min-height: 88px; padding: 12px 14px; line-height: 1.4; resize: vertical; font: inherit; }
.sw-row { display: grid; grid-template-columns: repeat(10, minmax(0, 40px)); justify-content: space-between; gap: 2px; }
.sw { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 50%; }
.sw i { width: 66%; height: 66%; border-radius: 50%; background: var(--tag); }
.sw.on { box-shadow: inset 0 0 0 2px var(--ink); }
.tag-row { display: flex; align-items: center; gap: 12px; }
.tag-row small { display: block; }
.tag-sw { flex: none; width: 16px; height: 16px; border-radius: 5px; background: var(--tag); }
.ch-gym { margin-top: 0; }
.ch-other { margin-top: 6px; }
.v-fab { position: fixed; right: 16px; bottom: calc(80px + var(--safe-b)); z-index: 25; display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 22px 0 18px; border-radius: 28px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 17px; box-shadow: 0 6px 20px rgb(20 40 30 / .28); }
body:has(.timer-bar.on) .v-fab { bottom: calc(146px + var(--safe-b)); }
@media (min-width: 600px) { .v-fab { right: calc(50% - 264px); } }

/* ───── профиль: тело и замеры ───── */
.pf { display: flex; flex-direction: column; gap: 10px; }
.pf-hero { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 16px; border-radius: 18px; background: var(--surface); }
.pf-main { display: flex; flex-direction: column; gap: 2px; text-align: left; min-width: 0; }
.pf-main small, .pf-mini small { font-size: 13px; color: var(--ink-2); }
.pf-main b { font: 600 44px/1 var(--font-num); letter-spacing: -.01em; }
.pf-main b span { font-size: 18px; font-weight: 500; color: var(--ink-2); }
.pf-empty { color: var(--ink-2); }
.pf-sub { font-size: 14px; color: var(--ink-2); }
.pf-side { display: flex; flex-direction: column; gap: 6px; }
.pf-mini { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 96px; padding: 8px 12px; border-radius: 12px; background: var(--bg); text-align: left; }
.pf-mini b { font: 600 18px/1.1 var(--font-num); }
.pf-add { grid-column: 1 / -1; }
.pf-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 14px; }
.pf-head h2 { font: 600 22px/1.2 var(--font-head); }
.pf-list { display: flex; flex-direction: column; }
.pf-row { display: grid; grid-template-columns: 1fr auto 76px; align-items: center; gap: 10px; min-height: 60px; padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; }
.pf-row-main b { display: block; font-weight: 600; }
.pf-row-main small { font-size: 13px; color: var(--ink-2); }
.pf-row-val { text-align: right; font: 600 16px/1.2 var(--font-num); white-space: nowrap; }
.pf-hist-list { display: flex; flex-direction: column; }
.pf-hist { display: grid; grid-template-columns: max-content 1fr auto; align-items: baseline; gap: 12px; width: 100%; min-height: 48px; padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; }
.pf-hist-date { font: 500 15px/1.3 var(--font-num); }
.pf-hist b { font: 600 16px/1.3 var(--font-num); }
.pf-hist small { color: var(--ink-2); font-size: 13px; }
.pf-hist-vals { color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.pf-stats { margin-top: 4px; }
.pf-routine { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-bottom: 1px solid var(--line); }
.pf-routine:last-child { border-bottom: 0; }
.pf-routine-name { flex: 1; min-height: 44px; text-align: left; font-weight: 600; }
.pf-routine-go { width: auto; min-height: 42px; padding: 0 16px; }
.pf-form { display: flex; flex-direction: column; background: var(--surface); border-radius: 12px; padding: 0 14px; }
.pf-field { display: grid; grid-template-columns: 1fr 96px 28px; align-items: center; gap: 8px; min-height: 54px; border-bottom: 1px solid var(--line); }
.pf-field:last-child { border-bottom: 0; }
.pf-field span { font-weight: 500; }
.pf-field i { font-style: normal; color: var(--ink-2); font-size: 14px; }
.pf-in { height: 42px; }
.pf-toggle span small, .toggle-row span small { display: block; color: var(--ink-2); font-size: 13px; }
.pf-note { max-width: 32ch; line-height: 1.35; }
.pf-custom { display: grid; grid-template-columns: 1fr 80px; gap: 8px; }
.pf-ask { font-size: 15px !important; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.pf-fat b { font-size: 28px; }
.pf-fat small { display: block; margin-top: 2px; color: var(--ink-2); font-size: 13px; }
.pf-plate { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 14px; background: var(--surface); box-shadow: inset 4px 0 0 var(--pr); }
.pf-plate > p { font-weight: 600; line-height: 1.35; }
.pf-need b { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.pf-need ul { list-style: none; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; }
.pf-need li { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.pf-need li svg { flex: none; color: var(--ink-2); }
.pf-need li.ok { color: var(--ink-2); }
.pf-need li.ok svg { color: var(--accent); }
.pf-sex { grid-template-columns: 1fr auto; }
.pf-sex-btns { display: flex; gap: 6px; }
.pf-sex-btns .chip { min-height: 36px; padding: 0 12px; font-size: 14px; }


/* ───── тренер: экран доступа ───── */
.co-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.co-seg button { min-height: 40px; border-radius: 9px; font-weight: 600; color: var(--ink-2); }
.co-seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(20 40 30 / .12); }
.co-box { display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.co-h { font: 600 15px/1.2 var(--font-body); text-align: center; }
.co-code { padding: 6px 0 2px; font-size: 52px; letter-spacing: .22em; text-indent: .22em; }
.co-code-sm { font-size: 34px; }
.co-center { text-align: center; }
.co-scope { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 6px; }
.co-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.co-chips .chip { min-height: 36px; font-size: 14px; }
.co-enter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.co-enter .btn { width: auto; }
.co-input { font: 600 24px/1 var(--font-num); letter-spacing: .3em; text-align: center; }
.co-note { padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); font-size: 15px; }
.co-athlete { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; border-bottom: 1px solid var(--line); }
.co-athlete:last-child { border-bottom: 0; }
.co-athlete .menu-row { border-bottom: 0; }
.co-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-open { min-height: 36px; padding: 0 14px; border-radius: 18px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; }
.co-x { width: 44px; min-height: 44px; font-size: 22px; color: var(--ink-2); }

/* ───── чужой дневник: полоска сверху, правка спрятана ───── */
:root.is-viewing { --safe-t: calc(env(safe-area-inset-top, 0px) + 48px); }
.view-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 45; display: flex; align-items: center; gap: 12px; height: calc(env(safe-area-inset-top, 0px) + 48px); padding: env(safe-area-inset-top, 0px) var(--gutter) 0; background: var(--accent); color: var(--accent-ink); }
.view-bar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.view-bar-text b { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.view-bar-text small { font-size: 12px; opacity: .8; }
.view-bar-close { flex: none; min-height: 34px; padding: 0 14px; border-radius: 17px; background: var(--accent-ink); color: var(--accent); font-weight: 600; font-size: 14px; }
.is-viewing .edit-only, .is-viewing .fab, .is-viewing .v-fab, .is-viewing .b-go, .is-viewing .b-import,
.is-viewing .a-settings, .is-viewing .b-settings, .is-viewing .c-settings { display: none !important; }
