/* Токены — строго по макеты/4_bento_ios.html (утверждённый макет). */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }

/* Защита: автор-правило с display (например .card-btn) иначе перебивает
   юзер-агентское [hidden]{display:none} — порядок cascade решает происхождение
   раньше специфичности, так что author-normal побеждает UA-normal всегда. */
[hidden] { display: none !important; }

html, body { background: #EFEFF4; min-height: 100vh; }
body {
  font-family: -apple-system, system-ui, 'Helvetica Neue', Arial, sans-serif;
  color: #0B0B0F;
  padding-top: env(safe-area-inset-top); /* viewport-fit=cover: контент не под статус-баром */
  padding-bottom: 84px; /* компенсация фикс. панели вкладок, чтобы контент не прятался под ней */
}
body.no-tabbar { padding-bottom: 0; } /* панель скрыта в фокус-режимах (сессия/итоги/бег) */

.wrap { max-width: 480px; margin: 0 auto; padding: 20px 16px 40px; }

.hd { display: flex; justify-content: space-between; align-items: center; margin: 6px 4px 16px; }
.step { font-size: 13px; font-weight: 600; color: #8E8E93; }
.pill { font-size: 13px; font-weight: 600; color: #0A84FF; background: #E5F0FF; padding: 6px 12px; border-radius: 100px; }

.card { background: #fff; border-radius: 22px; padding: 20px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.card.big h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 6px; }
.card.big .s { font-size: 15px; color: #8E8E93; font-weight: 600; }
.workout-eyebrow,
.workout-guidance-label { color: #8E8E93; font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.workout-eyebrow { margin-bottom: 4px; }
.workout-guidance-label { margin: 14px 0 4px; }
.workout-venue { padding: 15px; }
.workout-venue-label {
  margin: 0 2px 10px;
  font-size: 14px;
  font-weight: 800;
}
.workout-venue-options {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 5px;
  padding: 4px;
  border-radius: 15px;
  background: #EFEFF4;
}
.workout-venue-button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  color: #636366;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}
.workout-venue-button.selected {
  color: #0A67D8;
  background: #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .09);
}
.workout-venue-status {
  margin: 9px 2px 0;
  color: #636366;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}
.card.accent { background: #0A84FF; color: #fff; }
.card.accent .s { color: #cfe4ff; }
.card.accent .history-sub { color: #cfe4ff; }

.card-btn { border: 0; font: inherit; text-align: left; width: 100%; cursor: pointer; color: inherit; }

.habits-card {
  padding: 17px 16px 10px;
  border: 2px solid #0A84FF;
}
.habits-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.habits-eyebrow {
  margin-bottom: 3px;
  color: #0A84FF;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.habits-count {
  flex: 0 0 auto;
  border-radius: 100px;
  padding: 6px 10px;
  color: #0A84FF;
  background: #E5F0FF;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.habits-progress {
  height: 6px;
  margin: 13px 0 4px;
  overflow: hidden;
  border-radius: 100px;
  background: #E9E9EE;
}
.habits-progress > div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #0A84FF;
  transition: width .2s ease;
}
.habits-list { margin-top: 4px; }
.habit-row {
  display: grid;
  grid-template-columns: 26px 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 51px;
  border: 0;
  border-bottom: 1px solid #EFEFF4;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.habit-row:last-child { border-bottom: 0; }
.habit-check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid #C7C7CC;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}
.habit-icon { font-size: 21px; text-align: center; }
.habit-name { font-size: 15px; font-weight: 750; }
.habit-row.done .habit-check { border-color: #34C759; background: #34C759; }
.habit-row.done .habit-name { color: #636366; }
.habit-row:active { opacity: .58; }

.focus-widget-settings {
  margin-top: 5px;
  border-top: 1px solid #EFEFF4;
}
.focus-widget-settings summary {
  padding: 13px 2px 8px;
  color: #0A84FF;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  list-style-position: inside;
}
.focus-widget-body { padding: 3px 2px 6px; }
.focus-widget-lead,
.focus-widget-privacy,
.focus-widget-status {
  color: #636366;
  font-size: 12px;
  line-height: 1.4;
}
.focus-widget-steps {
  margin: 10px 0 8px 18px;
  color: #3A3A3C;
  font-size: 12px;
  line-height: 1.45;
}
.focus-widget-link {
  display: inline-block;
  margin: 4px 0 10px;
  color: #0A84FF;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.focus-widget-label {
  display: block;
  margin: 4px 0 6px;
  color: #3A3A3C;
  font-size: 11px;
  font-weight: 750;
}
.focus-widget-input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #D1D1D6;
  border-radius: 11px;
  outline: none;
  background: #F7F7FA;
  color: #0B0B0F;
  font: inherit;
  font-size: 13px;
}
.focus-widget-input:focus { border-color: #0A84FF; background: #fff; }
.focus-widget-settings .btn-wide { margin-top: 8px; }
.focus-widget-privacy { margin-top: 8px; color: #8E8E93; font-size: 11px; }
.focus-widget-ready {
  margin: 6px 0 12px;
  color: #248A3D;
  font-size: 13px;
  font-weight: 800;
}
.focus-widget-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.focus-widget-code-row .btn { min-height: 42px; padding: 0 12px; }
.focus-widget-download {
  display: block;
  color: #0A84FF;
  background: #E5F0FF;
  text-align: center;
  text-decoration: none;
}
.focus-widget-reset {
  display: block;
  margin: 4px 0 0;
  border: 0;
  color: #8E8E93;
  background: transparent;
  font: inherit;
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
}
.focus-widget-status { margin-top: 9px; color: #248A3D; font-weight: 700; }
.focus-widget-error { margin-top: 9px; }

.focus-viewer-notice {
  margin: 10px 0 12px;
  padding: 12px 14px;
  border: 1px solid #B9D8FF;
  border-radius: 14px;
  color: #24527A;
  background: #EEF7FF;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}
body.focus-viewer #tabbar,
body.focus-viewer #hub-workout-tile,
body.focus-viewer #hub-weights-tile { display: none !important; }
body.focus-viewer .habit-row { pointer-events: none; cursor: default; }

.note { font-size: 13px; color: #8E8E93; margin-top: 8px; line-height: 1.35; }

.mini .l { font-size: 12px; color: #8E8E93; font-weight: 600; margin-bottom: 6px; }
.mini .v { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }

.technique-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
  background: rgba(11, 11, 15, .58);
}
.technique-sheet {
  width: min(480px, 100%);
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  border-radius: 24px;
  outline: none;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .24);
}
.technique-sheet-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid #EFEFF4;
}
.technique-sheet-head strong { font-size: 16px; line-height: 1.25; }
.technique-close,
.technique-open {
  flex: 0 0 auto;
  border: 0;
  border-radius: 100px;
  padding: 8px 12px;
  color: #0A84FF;
  background: #E5F0FF;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.technique-sheet img { display: block; width: 100%; }
.technique-copy { padding: 17px 18px 20px; }
.technique-label {
  margin: 16px 0 7px;
  color: #8E8E93;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.technique-copy > .technique-label:first-child { margin-top: 0; }
.technique-steps,
.technique-mistakes {
  padding-left: 21px;
  color: #25252A;
  font-size: 15px;
  line-height: 1.45;
}
.technique-steps li,
.technique-mistakes li { margin-bottom: 8px; }
.technique-callout {
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 14px;
  color: #083B73;
  background: #EAF4FF;
}
.technique-callout .technique-label { margin-top: 0; color: #0A67D8; }
.technique-callout p { color: inherit; font-size: 14px; font-weight: 700; line-height: 1.4; }
.technique-safety {
  margin-top: 14px;
  padding: 12px 13px;
  border-radius: 13px;
  color: #8A4B08;
  background: #FFF4E5;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}
.technique-link {
  display: block;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 13px;
  color: #0A67D8;
  background: #F2F7FF;
  font-size: 14px;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}

.effort-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  background: rgba(11, 11, 15, .55);
}
.effort-sheet {
  width: min(448px, 100%);
  max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  padding: 22px 18px 18px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .22);
}
.effort-sheet h2 {
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.effort-exercise {
  margin-top: 6px;
  color: #636366;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.effort-comment-label {
  display: block;
  margin-top: 16px;
  color: #25252A;
  font-size: 13px;
  font-weight: 750;
}
.effort-comment-input {
  width: 100%;
  min-height: 62px;
  margin-top: 7px;
  padding: 11px 12px;
  resize: none;
  border: 1px solid #E5E5EA;
  border-radius: 13px;
  outline: none;
  color: #0B0B0F;
  background: #F7F9FC;
  font: inherit;
  /* iOS Safari автоматически масштабирует viewport при фокусе на поле
     со шрифтом меньше 16px. После закрытия шторки этот масштаб мог
     оставаться на следующем упражнении. */
  font-size: 16px;
  line-height: 1.35;
}
.effort-comment-input:focus { border-color: #0A84FF; background: #fff; }
.effort-comment-help {
  margin-top: 5px;
  color: #8E8E93;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}
.effort-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}
.effort-button {
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  color: #0B0B0F;
  background: #F2F2F7;
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}
.effort-button:active { background: #DDEBFF; color: #0A84FF; }
.effort-button.selected {
  color: #fff;
  background: #0A84FF;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, .18);
}
.effort-scale-help {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  color: #8E8E93;
  font-size: 11px;
  font-weight: 600;
}
.effort-rir {
  margin-top: 13px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #4A4A50;
  background: #F7F9FC;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
}
.effort-save { margin-top: 14px; }

.session-exercise-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.session-exercise-copy { min-width: 0; }
.session-eyebrow { color: #8E8E93; font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.session-scheme-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.session-scheme-chip {
  border-radius: 100px;
  padding: 5px 9px;
  color: #4A4A50;
  background: #F2F2F7;
  font-size: 12px;
  font-weight: 700;
}
.session-format {
  margin-top: 9px;
  padding: 9px 10px;
  border-left: 3px solid #0A84FF;
  border-radius: 0 10px 10px 0;
  color: #31516F;
  background: #F2F7FF;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}
.session-previous {
  margin-top: 12px;
  padding: 11px;
  border-radius: 14px;
  background: #F7F9FC;
}
.session-previous-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.session-previous .l { color: #8E8E93; font-size: 12px; font-weight: 700; }
.session-previous-date { color: #AEAEB2; font-size: 11px; font-weight: 600; }
.session-last-sets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.session-set-chip {
  border-radius: 10px;
  padding: 7px 9px;
  color: #25252A;
  background: #F2F2F7;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.session-last-empty { color: #8E8E93; font-size: 14px; font-weight: 700; }
.session-last-comment {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #E5E5EA;
  color: #0A67D8;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.session-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #EFEFF4;
}
.session-meta-row .l { flex: 0 0 auto; color: #8E8E93; font-size: 12px; font-weight: 600; }
.session-meta-row .v { min-width: 0; overflow: hidden; font-size: 16px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.session-meta-button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }

.done-hero { margin-top: 8px; }
.done-card { padding: 17px 16px 7px; }
.done-list { margin-top: 8px; }
.done-row {
  padding: 11px 0;
  border-top: 1px solid #EFEFF4;
}
.done-row:first-child { border-top: 0; }
.done-row-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.done-row-copy strong { min-width: 0; font-size: 14px; line-height: 1.3; }
.done-row-copy span {
  flex: 0 0 auto;
  max-width: 48%;
  color: #636366;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-align: right;
}
.done-skipped .done-row-copy span, .done-pain .done-row-copy span { color: #8E8E93; }
.done-row-note {
  margin-top: 5px;
  color: #0A67D8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.flash { padding: 14px 18px; color: #8E8E93; font-size: 14px; line-height: 1.4; }
.flash.danger { color: #FF3B30; font-weight: 600; }

.grid { display: grid; gap: 12px; margin-bottom: 12px; }
.grid2 { grid-template-columns: 1fr 1fr; }
.grid3 { grid-template-columns: 1fr 1fr 1fr; }
.grid5 { grid-template-columns: repeat(5, 1fr); }

.btn { border: 0; border-radius: 18px; padding: 16px 6px; font-size: 15px; font-weight: 700; font-family: inherit; background: #fff; color: #0B0B0F; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); cursor: pointer; }
.btn-accent { background: #0A84FF; color: #fff; }
.btn-danger { background: #fff; color: #FF3B30; }
.btn-wide { width: 100%; margin-bottom: 12px; }
.btn:disabled { opacity: .35; pointer-events: none; }
.grid3 .btn { font-size: 13px; padding: 14px 2px; }
.grid5 .btn { padding: 14px 0; }

.input-row { display: flex; gap: 8px; margin-bottom: 8px; }
.input-row input { flex: 1; min-width: 0; border: 0; border-radius: 14px; padding: 14px 16px; font-size: 16px; font-family: inherit; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.input-row input::placeholder { color: #8E8E93; }

.error { color: #FF3B30; font-size: 13px; font-weight: 600; margin: 0 4px 12px; }

.card.timer {
  text-align: center;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background-color .18s, color .18s, transform .18s;
}
.card.timer .l { font-size: 12px; color: #8E8E93; font-weight: 700; margin-bottom: 4px; }
.timer-digits { font-size: 56px; font-weight: 700; font-variant-numeric: tabular-nums; }
.card.timer.done { background: #0A84FF; color: #fff; }
.card.timer.done .l { color: #cfe4ff; }
.rest-presets .btn { font-size: 18px; }

@keyframes timer-alert-pulse {
  0%, 100% { background: #fff; color: #0B0B0F; transform: scale(1); }
  35%, 70% { background: #FF3B30; color: #fff; transform: scale(1.018); }
}
@keyframes timer-alert-label-pulse {
  0%, 100% { color: #8E8E93; }
  35%, 70% { color: rgba(255,255,255,.84); }
}
.card.timer.alerting { animation: timer-alert-pulse .72s ease-in-out; }
.card.timer.alerting .l { animation: timer-alert-label-pulse .72s ease-in-out; }

@media (prefers-reduced-motion: reduce) {
  .habits-progress > div { transition: none; }
  .card.timer.alerting { animation: none; background: #FF3B30; color: #fff; }
  .card.timer.alerting .l { animation: none; color: rgba(255,255,255,.84); }
}

p { color: #8E8E93; font-size: 15px; line-height: 1.4; }

/* История */
.history-title { font-size: 16px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 4px; }
.history-sub { font-size: 13px; color: #8E8E93; font-weight: 600; }
.history-details { margin-top: 14px; padding-top: 14px; border-top: 1px solid #EFEFF4; }
.history-line { font-size: 14px; margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.history-line:last-child { margin-bottom: 0; }
.history-line.pain { color: #FF3B30; font-weight: 600; }
.history-line.skipped { color: #8E8E93; }
.line-edit { background: none; border: none; font-size: 16px; padding: 4px; cursor: pointer; }

/* Нижняя панель вкладок (дизайн_v7_хаб_и_взвешивание.md, раздел 1). Видна на
   экранах-разделах (today/workout/weights/history), скрыта в фокус-режимах —
   управляется через showScreen()/body.no-tabbar в screens.js. */
#tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex;
  background: rgba(255, 255, 255, .92);
  border-top: 1px solid rgba(60, 60, 67, .12);
  padding: 8px 4px calc(10px + env(safe-area-inset-bottom));
  z-index: 10;
}
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 0; background: none; font: inherit; cursor: pointer;
  color: #8E8E93; font-size: 11px; font-weight: 600;
  padding: 4px 0;
}
.tab .i { font-size: 24px; line-height: 1; }
.tab.on { color: #0A84FF; }

/* Значок версии приложения — едва заметный, не перехватывает тапы (заказ CEO 09.07.2026).
   Поднят над панелью вкладок; когда панель скрыта (body.no-tabbar) — возвращается вниз. */
.app-version { position: fixed; left: 8px; bottom: calc(72px + env(safe-area-inset-bottom)); font-size: 10px; color: rgba(60,60,67,.3); pointer-events: none; user-select: none; }
body.no-tabbar .app-version { bottom: calc(4px + env(safe-area-inset-bottom)); }

/* Сессия v24: карточка упражнения никогда не ужимает и не обрезает данные.
   На высокой высоте таймер заполняет остаток экрана; если описание или прошлые
   подходы длинные, естественно прокручивается весь экран без перекрытий. */
body.session-mode .wrap {
  min-height: calc(100vh - env(safe-area-inset-top));
  min-height: calc(100dvh - env(safe-area-inset-top));
  padding: 8px 12px calc(12px + env(safe-area-inset-bottom));
}
#screen-session {
  min-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px);
  min-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#screen-session[hidden] { display: none !important; }
#screen-session > .hd,
#screen-session > .card,
#screen-session > .grid,
#screen-session > .input-row,
#screen-session > .error {
  flex: 0 0 auto;
  margin-bottom: 0;
}
#screen-session > .hd { margin: 0 4px; min-height: 34px; gap: 6px; flex-wrap: wrap; }
#screen-session .pill { padding: 5px 10px; }
#screen-session .card.strip { padding: 6px; }
#screen-session .dot { padding: 5px 2px; }
#screen-session > .session-exercise-card {
  flex: 0 0 auto;
  min-height: auto;
  padding: 15px;
}
#screen-session .session-exercise-card h1 { font-size: 21px; margin-bottom: 3px; }
#screen-session .session-exercise-card .note {
  display: block;
  overflow: visible;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
#screen-session .session-meta-row { margin-top: 7px; padding-top: 7px; }
#screen-session .input-row { min-height: 46px; }
#screen-session .input-row input { padding: 11px 14px; }
#screen-session .input-row .btn { padding-top: 11px; padding-bottom: 11px; }
#screen-session > .card.timer {
  flex: 1 0 180px;
  min-height: 180px;
  padding: 10px;
}
#screen-session .timer-digits { font-size: clamp(48px, 15vw, 62px); }
#screen-session .grid .btn { min-height: 46px; padding-top: 11px; padding-bottom: 11px; }
#screen-session .rest-presets { flex-basis: 46px; }
#screen-session .rest-presets .btn { font-size: 17px; }

@media (max-height: 720px) {
  body.session-mode .wrap { padding-top: 5px; }
  #screen-session { gap: 6px; }
  #screen-session > .hd { min-height: 30px; }
  #screen-session .card.strip { padding: 4px 6px; }
  #screen-session .dot { padding: 3px 2px; }
  #screen-session > .session-exercise-card { flex: 0 0 auto; min-height: auto; padding: 10px 12px; }
  #screen-session .session-exercise-card h1 { font-size: 19px; }
  #screen-session .session-exercise-card .note { display: block; }
  #screen-session .session-scheme-chips { margin-top: 5px; }
  #screen-session .session-scheme-chip { padding: 4px 7px; font-size: 11px; }
  #screen-session .session-previous { margin-top: 7px; padding: 8px; }
  #screen-session .session-last-sets { margin-top: 5px; gap: 4px; }
  #screen-session .session-set-chip { padding: 5px 7px; font-size: 12px; }
  #screen-session .session-meta-row { margin-top: 5px; padding-top: 5px; }
  #screen-session > .card.timer { flex: 1 0 150px; min-height: 150px; }
  #screen-session .grid .btn { min-height: 42px; padding-top: 9px; padding-bottom: 9px; }
}

/* Полоска статусов упражнений сессии (Шаг 8): свободный порядок — видно, что
   записано, что пропущено, что осталось; тап по кружку = переход. */
.card.strip { display: grid; grid-template-columns: repeat(var(--strip-columns, 6), minmax(0, 1fr)); gap: 6px; padding: 10px 8px; }
.card.strip.strip-long { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dot { min-width: 0; min-height: 44px; border: 0; border-radius: 12px; padding: 8px 2px; background: #F2F2F7; font-family: inherit; cursor: pointer; }
.dot-icon { display: block; font-size: 15px; font-weight: 700; line-height: 1.15; color: #C7C7CC; }
.dot-name { display: block; font-size: 9px; font-weight: 700; color: #8E8E93; margin-top: 2px; overflow-wrap: anywhere; }
@media (max-width: 374px) {
  .card.strip:not(.strip-long) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.dot.here { background: #0A84FF; }
.dot.here .dot-icon { color: #fff; }
.dot.here .dot-name { color: rgba(255, 255, 255, .75); }
.dot.st-done { background: #E4F7EA; }
.dot.st-done .dot-icon { color: #28A745; }
.dot.st-skipped .dot-icon, .dot.st-pain .dot-icon { color: #8E8E93; }

/* Экран «Состав тела» (шаг 9) */
.tile-row { display: flex; justify-content: space-between; align-items: center; }
.tile-arr { color: #8E8E93; font-size: 20px; font-weight: 700; }
.m-row { display: flex; align-items: baseline; gap: 8px; padding: 9px 0; border-bottom: 1px solid #F0F0F4; font-variant-numeric: tabular-nums; }
.m-row:last-child { border-bottom: 0; padding-bottom: 0; }
.m-row:first-child { padding-top: 0; }
.m-name { font-size: 14px; color: #3C3C43; flex: 1; min-width: 0; }
.m-hist { display: block; font-size: 12px; color: #8E8E93; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-val { font-size: 15px; font-weight: 800; }
.m-delta { font-size: 12px; font-weight: 700; border-radius: 100px; padding: 2px 8px; min-width: 46px; text-align: center; }
.m-delta.good { color: #1D7A3A; background: #E4F5E9; }
.m-delta.bad { color: #C62F35; background: #FCE9EA; }
.m-delta.neutral { color: #8E8E93; background: #F0F0F4; }

/* Круговое кардио — текущие белые карточки и синий акцент Тренера. */
#screen-circuit { position: relative; min-width: 0; }
.circuit-exit { border: 0; background: none; color: #0A84FF; font: inherit; font-size: 15px; font-weight: 650; line-height: 1.4; padding: 8px 0 18px; }
.circuit-copy { margin-top: 12px; color: #8E8E93; font-size: 15px; line-height: 1.45; font-weight: 600; }
.circuit-current { margin-top: 14px; font-size: 25px; font-weight: 800; letter-spacing: -.025em; overflow-wrap: anywhere; }
.circuit-next { margin-top: 12px; color: #0A67D8; font-size: 15px; font-weight: 700; }
.circuit-target-control { display: grid; grid-template-columns: 58px minmax(0,1fr) 58px; align-items: center; gap: 16px; margin-top: 24px; }
#circuit-target { text-align: center; font-size: 48px; font-weight: 800; }
.circuit-rounds { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 6px; margin-top: 15px; }
.circuit-round { border-radius: 10px; background: #EFEFF4; color: #8E8E93; min-height: 36px; display: grid; place-items: center; font-size: 13px; font-weight: 750; }
.circuit-round.done { background: #E5F0FF; color: #0A67D8; }
.circuit-round.current { background: #0A84FF; color: #fff; }
.circuit-stations { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 12px; }
.circuit-station { min-width: 0; padding: 16px 5px; background: #fff; border-radius: 19px; text-align: center; font-size: 13px; font-weight: 750; overflow-wrap: anywhere; }
.circuit-station small { display: block; margin-top: 6px; font-size: 11px; font-weight: 600; color: #8E8E93; }
.circuit-station.current { background: #0A84FF; color: #fff; }
.circuit-station.current small { color: #fff; }
.circuit-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 8px; margin-top: 10px; }
.circuit-actions .btn { min-width: 0; padding-inline: 8px; font-size: 14px; }
#screen-circuit button { touch-action: manipulation; }
.circuit-main { min-height: 72px; }
.circuit-overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: #EFEFF4F2; padding: 18px; overflow: hidden; }
.circuit-celebration { position: relative; width: min(100%,390px); background: #fff; border-radius: 28px; padding: 34px 20px 27px; text-align: center; box-shadow: 0 24px 60px #0786ff28; z-index: 1; }
.circuit-medal { margin: 8px auto 34px; width: 108px; height: 108px; border-radius: 50%; background: #0A84FF; display: grid; place-items: center; font-size: 56px; box-shadow: 0 0 0 12px #0786ff12,0 0 0 28px #0786ff08; }
#circuit-phrase { font-size: 34px; font-weight: 850; line-height: 1.08; letter-spacing: -.04em; overflow-wrap: anywhere; }
.circuit-effect-result { margin-top: 19px; font-size: 16px; font-weight: 700; }
.circuit-effect-next { margin-top: 20px; background: #E5F0FF; padding: 13px 9px; border-radius: 15px; color: #0A67D8; font-size: 14px; font-weight: 750; }
.circuit-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.circuit-piece { position: absolute; left: 50%; top: 40%; width: 8px; height: 13px; background: #0A84FF; border-radius: 2px; opacity: 0; }
.circuit-piece:nth-child(3n) { background: #63c9ff; }
.circuit-piece:nth-child(3n + 1) { background: #ffd05a; }
.circuit-playing .circuit-celebration { animation: circuit-arrive 3000ms cubic-bezier(.2,.8,.2,1) both; }
.circuit-playing .circuit-medal { animation: circuit-punch 650ms cubic-bezier(.16,.9,.22,1.2) both; }
.circuit-playing .circuit-piece { animation: circuit-burst 1700ms ease-out both; animation-delay: var(--delay); }
@keyframes circuit-arrive { 0% { opacity: 0; transform: translateY(30px) scale(.86); } 9% { opacity: 1; transform: translateY(-4px) scale(1.025); } 16%,100% { opacity: 1; transform: none; } }
@keyframes circuit-punch { 0% { transform: scale(.15) rotate(-18deg); } 65% { transform: scale(1.15) rotate(5deg); } 100% { transform: none; } }
@keyframes circuit-burst { 0% { opacity: 0; transform: translate(0,0) scale(.3); } 10%,55% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x),var(--y)) rotate(var(--r)); } }
@media (prefers-reduced-motion: reduce) { .circuit-playing * { animation: none !important; } }
@media (max-width: 360px) { #circuit-phrase { font-size: 30px; } .circuit-stations { gap: 5px; } }
