/* ═══════════════════════════════════════════════════════════════
   ATLET · дизайн-система
   Светлая «костяная» бумага, чернильный текст, один сигнальный акцент.
   Всё на CSS: без библиотек, без иконочных шрифтов.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* поверхности */
  --paper:      #F2EFEA;
  --paper-deep: #E9E5DE;
  --surface:    #FFFFFF;
  --surface-2:  #FAF8F5;

  /* чернила */
  --ink:    #15161A;
  --ink-70: #4B4D55;
  --ink-45: #86868F;
  --ink-25: #B4B3B8;

  /* линии */
  --line:      #E3DED5;
  --line-soft: #EDE9E2;

  /* акценты */
  --accent:      #F04A23;
  --accent-deep: #C93B18;
  --accent-soft: #FDEDE8;
  --jade:        #0E9D72;
  --jade-soft:   #E4F5EE;
  --gold:        #B8862F;
  --gold-soft:   #F8F0DF;
  --violet:      #5B4BE0;
  --violet-soft: #ECEAFD;

  /* группы мышц */
  --m-chest:     #F04A23;
  --m-back:      #2F6FE0;
  --m-legs:      #7B3FD4;
  --m-shoulders: #0E9D72;
  --m-arms:      #D9761A;
  --m-core:      #C0392B;

  /* тени: слоями, мягко — «дорогая» глубина без темноты */
  --sh-1: 0 1px 2px rgba(21,22,26,.05), 0 1px 1px rgba(21,22,26,.03);
  --sh-2: 0 2px 4px rgba(21,22,26,.04), 0 12px 28px -16px rgba(21,22,26,.18);
  --sh-3: 0 4px 8px rgba(21,22,26,.05), 0 24px 60px -24px rgba(21,22,26,.28);
  --sh-pop: 0 30px 80px -30px rgba(21,22,26,.4);

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;

  --ease:   cubic-bezier(.22,.61,.36,1);
  --spring: cubic-bezier(.34,1.56,.64,1);

  --head: 'Instrument Serif', 'Times New Roman', serif;
  --ui:   'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --shell: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Тонкая плёнка зерна поверх всего — бумага перестаёт выглядеть «пластиковой» */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='.32'/></svg>");
  mix-blend-mode: multiply;
}

/* Мягкие цветные пятна на фоне — медленно дышат, GPU-дешёвые */
.aura { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aura i {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(70px); opacity: .5;
  animation: drift 26s var(--ease) infinite alternate;
  will-change: transform;
}
.aura i:nth-child(1) { width: 46vw; height: 46vw; top: -14vw; right: -8vw; background: radial-gradient(circle, rgba(240,74,35,.20), transparent 70%); }
.aura i:nth-child(2) { width: 40vw; height: 40vw; bottom: -16vw; left: -10vw; background: radial-gradient(circle, rgba(91,75,224,.16), transparent 70%); animation-delay: -9s; animation-duration: 32s; }
.aura i:nth-child(3) { width: 30vw; height: 30vw; top: 42%; left: 48%; background: radial-gradient(circle, rgba(14,157,114,.13), transparent 70%); animation-delay: -16s; animation-duration: 38s; }

@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(4vw,5vh,0) scale(1.18); }
}

::selection { background: var(--ink); color: var(--paper); }

/* ─────────────────────────── типографика ─────────────────────────── */

h1, h2, h3 { font-weight: 400; letter-spacing: -.01em; }
.display {
  font-family: var(--head);
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  line-height: .96; letter-spacing: -.02em;
}
.display em { font-style: italic; color: var(--accent); }

.h-sec {
  font-family: var(--mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-45);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.h-sec::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.serif { font-family: var(--head); font-weight: 400; }
.muted { color: var(--ink-45); }
.tiny  { font-size: 12px; }

/* ─────────────────────────── каркас ─────────────────────────── */

.shell { position: relative; z-index: 1; max-width: var(--shell); margin: 0 auto; padding: 0 20px 120px; }
.shell--narrow { max-width: 780px; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 0; margin-bottom: 26px;
  background: rgba(242, 239, 234, .82);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), padding .3s var(--ease);
}
.topbar.is-stuck { border-bottom-color: var(--line); padding: 11px 0; }
.topbar-inner { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--head); font-size: 21px; letter-spacing: .02em; text-decoration: none; color: var(--ink); }
.brand--lg { font-size: 26px; margin-bottom: 20px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 9px; flex: none;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep) 65%, #8E2A0F);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 12px -4px rgba(240,74,35,.7);
  position: relative;
}
.brand-mark::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(255,255,255,.22));
  border-radius: inherit;
}

.spacer { flex: 1; }

/* ─────────────────────────── кнопки ─────────────────────────── */

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--ui); font-size: 14px; font-weight: 600; letter-spacing: -.01em;
  padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--btn-bg); color: var(--btn-fg); cursor: pointer;
  text-decoration: none; white-space: nowrap; overflow: hidden;
  box-shadow: var(--sh-1);
  transition: transform .18s var(--spring), box-shadow .25s var(--ease), background .2s, border-color .2s, color .2s;
}
.btn::after {
  /* блик, пробегающий по кнопке при наведении */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.5) 50%, transparent 80%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn:hover { transform: translateY(-1.5px); box-shadow: var(--sh-2); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(.98); }

.btn--primary { --btn-bg: var(--ink); --btn-fg: #fff; border-color: var(--ink); box-shadow: 0 4px 14px -6px rgba(21,22,26,.6); }
.btn--primary:hover { box-shadow: 0 10px 26px -10px rgba(21,22,26,.6); }
.btn--accent {
  --btn-fg: #fff; border-color: transparent;
  background: linear-gradient(140deg, #FF6A3D, var(--accent) 55%, var(--accent-deep));
  box-shadow: 0 6px 18px -8px rgba(240,74,35,.9);
}
.btn--accent:hover { box-shadow: 0 14px 32px -12px rgba(240,74,35,.85); }
.btn--ghost { background: transparent; box-shadow: none; border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); }
.btn--sm  { padding: 8px 14px; font-size: 13px; }
.btn--lg  { padding: 15px 30px; font-size: 15.5px; }
.btn--full { width: 100%; }
.btn:disabled { opacity: .45; pointer-events: none; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-70); transition: all .2s var(--ease); flex: none;
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink-25); transform: translateY(-1px); }
.icon-btn:disabled { opacity: .35; pointer-events: none; }

/* Режим фокуса: во время тренировки на экране только она.
   Фоновые пятна выключаем — blur на пол-экрана дорого стоит слабому телефону. */
body.focus-mode .topbar { display: none; }
body.focus-mode .aura { display: none; }
body.focus-mode .session-head { padding-top: max(14px, env(safe-area-inset-top)); }

/* ─────────────────────────── карточки ─────────────────────────── */

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  transition: box-shadow .35s var(--ease), transform .35s var(--ease), border-color .3s;
}
.card--pad { padding: 22px 24px; }
.card--hover:hover { box-shadow: var(--sh-2); transform: translateY(-2px); border-color: var(--line); }
.card--flat { box-shadow: none; background: var(--surface-2); }

/* Карточка с «дорогим» верхним светом */
.card--lit::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.9), transparent 40%);
  opacity: .6;
}

.grid { display: grid; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.row--wrap { flex-wrap: wrap; }

/* ─────────────────────────── чипы, бэйджи ─────────────────────────── */

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-45); border: 1px solid var(--line-soft);
}
.chip--accent { background: var(--accent-soft); color: var(--accent-deep); border-color: transparent; }
.chip--jade   { background: var(--jade-soft);   color: var(--jade);        border-color: transparent; }
.chip--gold   { background: var(--gold-soft);   color: var(--gold);        border-color: transparent; }
.chip--violet { background: var(--violet-soft); color: var(--violet);      border-color: transparent; }
.chip--ink    { background: var(--ink); color: #fff; border-color: transparent; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

/* ─────────────────────────── формы ─────────────────────────── */

.form { display: grid; gap: 14px; }

.field { display: block; position: relative; }
.field > span {
  display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-45); margin-bottom: 7px;
}
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--ui); font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 12px 14px;
  transition: border-color .2s, box-shadow .25s var(--ease), background .2s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(21,22,26,.07);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-25); }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-45) 50%), linear-gradient(135deg, var(--ink-45) 50%, transparent 50%); background-position: calc(100% - 18px) 51%, calc(100% - 13px) 51%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

.switch { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-70); cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch > span {
  width: 42px; height: 24px; border-radius: 999px; background: var(--paper-deep);
  position: relative; transition: background .25s var(--ease); flex: none;
}
.switch > span::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: var(--sh-1);
  transition: transform .3s var(--spring);
}
.switch input:checked + span { background: var(--jade); }
.switch input:checked + span::after { transform: translateX(18px); }

.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-pick label { position: relative; cursor: pointer; }
.role-pick input { position: absolute; opacity: 0; }
.role-pick span {
  display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); font-size: 12.5px; color: var(--ink-45); line-height: 1.35;
  transition: all .22s var(--ease);
}
.role-pick span b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 2px; font-weight: 600; }
.role-pick input:checked + span {
  border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21,22,26,.07);
  transform: translateY(-1px);
}

.alert { padding: 12px 16px; border-radius: var(--r-sm); font-size: 13.5px; margin-bottom: 14px; line-height: 1.45; }
.alert--bad  { background: var(--accent-soft); color: var(--accent-deep); }
.alert--good { background: var(--jade-soft); color: var(--jade); }

.code-block {
  font-family: var(--mono); font-size: 11px; background: var(--ink); color: #E8E4DC;
  padding: 14px; border-radius: var(--r-sm); overflow: auto; max-height: 240px; margin-bottom: 14px;
  white-space: pre-wrap; word-break: break-all;
}

/* ─────────────────────────── страницы входа ─────────────────────────── */

.auth-page { display: grid; place-items: center; padding: 32px 18px; }
.auth-shell { position: relative; z-index: 1; width: 100%; max-width: 460px; }
.auth-card { background: var(--surface); border-radius: var(--r-xl); padding: 34px 32px; box-shadow: var(--sh-3); border: 1px solid var(--line-soft); }
.auth-title { font-family: var(--head); font-size: 34px; line-height: 1.05; margin-bottom: 6px; }
.auth-sub { color: var(--ink-45); font-size: 14px; margin-bottom: 22px; line-height: 1.5; }
.auth-foot { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--ink-45); }
.auth-foot a { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--ink-25); }
.auth-foot a:hover { border-color: var(--ink); }

.steps { display: flex; gap: 6px; margin-bottom: 22px; }
.steps-item {
  flex: 1; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-25); padding-top: 10px; border-top: 2px solid var(--line); transition: all .3s;
}
.steps-item.is-active { color: var(--accent); border-top-color: var(--accent); }
.steps-item.is-done   { color: var(--jade); border-top-color: var(--jade); }

.check-list { list-style: none; margin-bottom: 20px; display: grid; gap: 7px; }
.check-list li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-70); }
.check-list li span { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.check-list li.is-ok span   { background: var(--jade); }
.check-list li.is-warn span { background: var(--gold); }

/* ─────────────────────────── навигация в кабинете ─────────────────────────── */

.tabs { position: relative; display: flex; gap: 4px; background: var(--paper-deep); padding: 4px; border-radius: 999px; }
.tabs button {
  position: relative; z-index: 1; border: none; background: transparent; cursor: pointer;
  font-family: var(--ui); font-size: 13.5px; font-weight: 600; color: var(--ink-45);
  padding: 9px 17px; border-radius: 999px; transition: color .2s; white-space: nowrap;
}
.tabs button.is-active { color: var(--ink); }
.tab-icon { display: none; width: 22px; height: 22px; }
.tab-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.student-tabs { width: fit-content; max-width: 100%; }
.tabs .tab-pill {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0;
  background: var(--surface); border-radius: 999px; box-shadow: var(--sh-1);
  transition: transform .42s var(--spring), width .42s var(--spring);
}

.avatar {
  inline-size: 38px; block-size: 38px; flex: 0 0 38px;
  aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  box-sizing: border-box;
  display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff;
  background: linear-gradient(140deg, var(--ink), #3A3C44);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.avatar--lg { inline-size: 54px; block-size: 54px; flex-basis: 54px; font-size: 19px; }
.avatar img {
  inline-size: 100%; block-size: 100%; display: block;
  object-fit: cover; object-position: center center;
}
.avatar-editor {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
  padding-bottom: 20px; border-bottom: 1px solid var(--line-soft);
}
.avatar-editor .avatar--lg { inline-size: 72px; block-size: 72px; flex-basis: 72px; }

/* ─────────────────────────── метрики ─────────────────────────── */

.stat {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  padding: 16px 18px; position: relative; overflow: hidden;
}
.stat-val { font-family: var(--head); font-size: 34px; line-height: 1; letter-spacing: -.02em; }
.stat-val small { font-size: 14px; color: var(--ink-45); margin-left: 3px; font-family: var(--ui); }
.stat-lbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-45); margin-top: 6px; }
.stat-trend { position: absolute; top: 14px; right: 16px; font-size: 11px; font-family: var(--mono); }
.stat-trend.up   { color: var(--jade); }
.stat-trend.down { color: var(--accent); }

/* Кольцевой индикатор */
.ring { position: relative; display: grid; place-items: center; flex: none; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring circle { fill: none; stroke-linecap: round; }
.ring .track { stroke: var(--line); }
.ring .bar { stroke: var(--accent); transition: stroke-dashoffset .9s var(--ease); }
.ring-label { position: absolute; font-family: var(--mono); font-size: 12px; font-weight: 500; }

/* Полоса прогресса */
.bar { height: 6px; border-radius: 99px; background: var(--paper-deep); overflow: hidden; }
.bar > i {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), #FF7A4D);
  transition: width .8s var(--ease);
}
.bar--jade > i { background: linear-gradient(90deg, var(--jade), #3FD8A6); }
.bar--ink  > i { background: var(--ink); }

/* ─────────────────────────── карточка дня программы ─────────────────────────── */

.week-nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: none; }
.week-nav::-webkit-scrollbar { display: none; }
.week-btn {
  flex: none; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  border-radius: var(--r-md); padding: 11px 18px; text-align: left;
  font-family: var(--ui); transition: all .25s var(--ease); min-width: 116px;
}
.week-btn b { display: block; font-size: 14px; font-weight: 700; }
.week-btn span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-45); }
.week-btn.is-active { background: var(--ink); border-color: var(--ink); color: #fff; transform: translateY(-2px); box-shadow: var(--sh-2); }
.week-btn.is-active span { color: rgba(255,255,255,.6); }

.day-card {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); position: relative; overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.day-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--m); transform: scaleY(.25); transform-origin: center;
  transition: transform .4s var(--spring);
}
.day-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.day-card:hover::before { transform: scaleY(1); }
.day-card.is-done { background: var(--surface-2); }

.day-idx {
  width: 46px; height: 46px; border-radius: 15px; flex: none; display: grid; place-items: center;
  font-family: var(--head); font-size: 21px; background: var(--paper);
  color: var(--m); border: 1px solid var(--line-soft);
}
.day-body { flex: 1; min-width: 0; }
.day-title { font-size: 16px; font-weight: 700; letter-spacing: -.015em; }
.day-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-45); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.day-go { color: var(--ink-25); transition: transform .3s var(--spring), color .3s; flex: none; }
.day-card:hover .day-go { transform: translateX(4px); color: var(--ink); }

/* ─────────────────────────── экран тренировки ─────────────────────────── */

.session-head {
  position: sticky; top: 0; z-index: 30; padding: 14px 0 12px; margin-bottom: 16px;
  background: rgba(242, 239, 234, .88);
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid var(--line);
}

.ex-card {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  margin-bottom: 12px; overflow: hidden; box-shadow: var(--sh-1);
  transition: box-shadow .3s var(--ease), border-color .3s, opacity .4s;
}
.ex-card.is-complete { border-color: rgba(14,157,114,.35); background: linear-gradient(180deg, var(--jade-soft), var(--surface) 42%); }
.ex-head { display: flex; align-items: flex-start; gap: 14px; padding: 17px 18px 13px; }
.ex-num {
  width: 30px; height: 30px; border-radius: 10px; flex: none; display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  background: var(--paper); color: var(--m); border: 1px solid var(--line-soft);
  transition: all .3s var(--spring);
}
.ex-card.is-complete .ex-num { background: var(--jade); color: #fff; border-color: var(--jade); }
.ex-name { font-size: 15.5px; font-weight: 700; line-height: 1.3; letter-spacing: -.015em; }
.ex-sub { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.ex-scheme { font-family: var(--mono); font-size: 11.5px; color: var(--m); font-weight: 500; }
.ex-prev { font-family: var(--mono); font-size: 11px; color: var(--ink-45); }

.set-list { padding: 0 12px 12px; }
.set-row {
  display: grid; grid-template-columns: 34px 1fr 1fr 52px; gap: 8px; align-items: center;
  padding: 6px; border-radius: var(--r-sm); transition: background .25s;
}
.set-row + .set-row { margin-top: 2px; }
.set-row.is-done { background: var(--jade-soft); }
.set-no { font-family: var(--mono); font-size: 12px; color: var(--ink-45); text-align: center; }
.set-row.is-done .set-no { color: var(--jade); font-weight: 500; }

.set-input {
  position: relative; display: flex; align-items: center;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.set-input:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21,22,26,.07); background: var(--surface); }
.set-input input {
  width: 100%; border: none; background: transparent; outline: none;
  font-family: var(--mono); font-size: 16px; font-weight: 500; color: var(--ink);
  padding: 11px 8px 11px 12px; text-align: center; min-width: 0;
  -moz-appearance: textfield;
}
.set-input input::-webkit-outer-spin-button,
.set-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.set-input input::placeholder { color: var(--ink-25); font-weight: 400; }
.set-input em { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--ink-25); padding-right: 10px; letter-spacing: .05em; }

.set-check {
  width: 42px; height: 42px; border-radius: 13px; border: 1.5px solid var(--line);
  background: var(--surface); cursor: pointer; display: grid; place-items: center;
  transition: all .25s var(--spring); position: relative; overflow: hidden;
}
.set-check svg { width: 18px; height: 18px; stroke: var(--ink-25); stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.set-check svg path { stroke-dasharray: 26; stroke-dashoffset: 26; transition: stroke-dashoffset .35s var(--ease); }
.set-check:hover { border-color: var(--ink-25); transform: scale(1.05); }
.set-row.is-done .set-check { background: var(--jade); border-color: var(--jade); box-shadow: 0 4px 14px -5px rgba(14,157,114,.9); }
.set-row.is-done .set-check svg { stroke: #fff; }
.set-row.is-done .set-check svg path { stroke-dashoffset: 0; }

/* волна при отметке подхода */
@keyframes setPulse {
  0%   { box-shadow: 0 0 0 0 rgba(14,157,114,.5); }
  100% { box-shadow: 0 0 0 22px rgba(14,157,114,0); }
}
.set-check.pulse { animation: setPulse .6s var(--ease); }

.ex-note { padding: 0 18px 14px; font-size: 12.5px; color: var(--ink-45); font-style: italic; }

.superset-band {
  display: flex; align-items: center; gap: 8px; padding: 8px 18px;
  background: var(--violet-soft); color: var(--violet);
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
}

/* ─────────────────────────── аккордеон ───────────────────────────
   Всё на виду в свёрнутом состоянии, разворачивается только нужное. */

.acc {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); overflow: hidden; margin-bottom: 10px;
  transition: box-shadow .3s var(--ease), border-color .3s;
}
.acc.is-open { box-shadow: var(--sh-2); }
.acc-head {
  display: flex; align-items: center; gap: 12px; padding: 15px 20px;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
}
.acc-head:hover { background: var(--surface-2); }
.acc-title { font-weight: 700; font-size: 15px; flex: 1; letter-spacing: -.015em; }
.acc-hint { font-family: var(--mono); font-size: 11px; color: var(--ink-45); }
.acc-chev { color: var(--ink-25); transition: transform .4s var(--spring), color .3s; flex: none; }
.acc.is-open .acc-chev { transform: rotate(180deg); color: var(--ink); }

/* 0fr → 1fr: плавное раскрытие без замеров высоты в JS */
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .42s var(--ease); }
.acc.is-open .acc-body { grid-template-rows: 1fr; }
.acc-inner { overflow: hidden; min-height: 0; }
.acc-pad { padding: 0 20px 20px; }

/* ─────────────────────────── лента упражнений ─────────────────────────── */

.rail { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-item {
  flex: none; width: 38px; height: 38px; border-radius: 13px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-45);
  font-family: var(--mono); font-size: 12.5px; display: grid; place-items: center;
  transition: transform .3s var(--spring), background .25s, color .25s, border-color .25s;
}
.rail-item:hover { border-color: var(--ink-25); }
.rail-item.is-done { background: var(--jade-soft); color: var(--jade); border-color: transparent; }
.rail-item.is-current { background: var(--ink); color: #fff; border-color: var(--ink); transform: scale(1.1); }
.rail-item.is-done.is-current { background: var(--jade); color: #fff; border-color: var(--jade); }

/* Сцена одного упражнения */
.stage { min-height: 260px; }
.stage-in-next { animation: slideNext .38s var(--ease) both; }
.stage-in-prev { animation: slidePrev .38s var(--ease) both; }
@keyframes slideNext { from { opacity: 0; transform: translateX(26px); } }
@keyframes slidePrev { from { opacity: 0; transform: translateX(-26px); } }

.pager-btn.is-ready {
  animation: readyPulse 1.6s var(--ease) infinite;
}
@keyframes readyPulse {
  0%, 100% { box-shadow: 0 6px 18px -8px rgba(240,74,35,.9); }
  50%      { box-shadow: 0 6px 26px -4px rgba(240,74,35,1); }
}

.ex-counter {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-45); text-align: center; padding: 4px 0 10px;
}

/* ─────────────────────────── таймер отдыха ─────────────────────────── */

.rest {
  /* поднят над нижней панелью с кнопкой «Дальше» */
  position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 130%) scale(.9);
  display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: #fff; border-radius: 999px;
  padding: 10px 12px 10px 14px; box-shadow: var(--sh-pop);
  transition: transform .5s var(--spring), opacity .3s;
  opacity: 0; pointer-events: none;
}
.rest.is-on { transform: translate(-50%, 0) scale(1); opacity: 1; pointer-events: auto; }
.rest-time { font-family: var(--mono); font-size: 19px; font-weight: 500; min-width: 52px; letter-spacing: -.02em; }
.rest-lbl { font-size: 11px; color: rgba(255,255,255,.55); font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.rest-ring { width: 38px; height: 38px; flex: none; }
.rest-ring circle { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.rest-ring .t { stroke: rgba(255,255,255,.16); }
.rest-ring .b { stroke: #FF7A4D; transition: stroke-dashoffset 1s linear; }
.rest button {
  background: rgba(255,255,255,.12); border: none; color: #fff; cursor: pointer;
  border-radius: 999px; padding: 7px 13px; font-family: var(--mono); font-size: 11px;
  transition: background .2s;
}
.rest button:hover { background: rgba(255,255,255,.24); }

/* ─────────────────────────── нижняя панель действий ─────────────────────────── */

.action-bar {
  position: sticky; bottom: 0; z-index: 25; margin-top: 20px;
  padding: 14px 0 max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--paper) 32%);
}

/* ─────────────────────────── графики ─────────────────────────── */

.chart { width: 100%; display: block; overflow: visible; }
.chart .line { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chart .area { stroke: none; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; }
.chart .pt { stroke: var(--surface); stroke-width: 2.5; }
.chart .lbl { font-family: var(--mono); font-size: 9.5px; fill: var(--ink-25); }

.draw-line { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.5s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.fade-area { opacity: 0; animation: fadeIn .8s .5s var(--ease) forwards; }
@keyframes fadeIn { to { opacity: 1; } }

.spark { display: block; height: 30px; width: 100%; overflow: visible; }
.spark path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Календарь активности */
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat i {
  width: 13px; height: 13px; border-radius: 4px; background: var(--paper-deep); display: block;
  transition: transform .2s var(--spring);
}
.heat i[data-n="1"] { background: #FBC4B2; }
.heat i[data-n="2"] { background: #F58A64; }
.heat i[data-n="3"] { background: var(--accent); }
.heat i:hover { transform: scale(1.35); }

/* ─────────────────────────── ученики (тренер) ─────────────────────────── */

.daily-brief { overflow: hidden; background: linear-gradient(145deg,#202126,#303138); color: #fff; border-color: transparent; }
.daily-brief .h-sec { color: rgba(255,255,255,.48); }
.daily-brief__title { font-family: var(--head); font-size: clamp(24px,4vw,34px); line-height: 1.05; }
.daily-brief .chip { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.1); color: #fff; }
.briefing-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 18px; }
.briefing-stats > div { padding: 11px 12px; border-radius: 13px; background: rgba(255,255,255,.08); }
.briefing-stats b,.briefing-stats span { display: block; }
.briefing-stats b { font-size: 22px; }
.briefing-stats span { margin-top: 2px; color: rgba(255,255,255,.52); font-size: 10px; }
.attention-queue { display: grid; gap: 7px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); }
.attention-person { width: 100%; display: grid; grid-template-columns: 38px minmax(0,1fr) 24px; gap: 10px; align-items: center; padding: 9px 10px; border: 0; border-radius: 13px; background: rgba(255,255,255,.09); color: #fff; text-align: left; cursor: pointer; }
.attention-person:hover { background: rgba(255,255,255,.14); }
.attention-person .avatar { width: 38px; height: 38px; flex-basis: 38px; }
.attention-person__body { min-width: 0; }
.risk-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.attention-person .risk-flags { margin-top: 3px; }
.risk-flag { display: inline-flex; padding: 4px 7px; border-radius: 999px; background: var(--paper-deep); color: var(--ink-45); font-size: 9.5px; line-height: 1.15; }
.risk-flag.high { background: #FBE1D8; color: #A72F14; }
.risk-flag.medium { background: #FFF0C9; color: #795A0E; }
.attention-person .risk-flag { background: rgba(255,255,255,.11); color: rgba(255,255,255,.72); }
.attention-person .risk-flag.high { background: rgba(240,74,35,.24); color: #FFD3C7; }
.attention-person .day-go { color: rgba(255,255,255,.7); }
.live-now { display: grid; gap: 7px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); }
.live-now__title { display: flex; align-items: center; gap: 7px; color: rgba(255,255,255,.66); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.live-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: #67E5A7; box-shadow: 0 0 0 0 rgba(103,229,167,.45); animation: live-pulse 1.7s infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 7px rgba(103,229,167,0); } 100% { box-shadow: 0 0 0 0 rgba(103,229,167,0); } }
.live-now__person { width: 100%; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid rgba(103,229,167,.18); border-radius: 13px; background: rgba(103,229,167,.08); color: #fff; text-align: left; cursor: pointer; }
.live-now__person .avatar { width: 38px; height: 38px; }
.live-now__person b,.live-now__person small { display: block; }
.live-now__person small { margin-top: 2px; color: rgba(255,255,255,.5); font-size: 10px; }
.live-now__action { color: #9AF0C4; font-size: 10.5px; font-weight: 700; }
.live-editor-head { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: start; gap: 13px; margin-bottom: 18px; }
.live-editor-head .display { font-size: clamp(36px,7vw,58px); }
.live-status { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 999px; background: #E3F8EE; color: #167B58; font-size: 10px; font-weight: 800; }
.live-editor-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.live-editor-toolbar p { margin-top: 4px; }
.live-persist { display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 10px; min-width: 240px; cursor: pointer; }
.live-persist input { width: 36px; height: 22px; accent-color: var(--accent); }
.live-persist b,.live-persist small { display: block; }
.live-persist small { margin-top: 2px; color: var(--ink-45); font-size: 9.5px; }
.live-editor-actions { justify-content: space-between; margin-bottom: 10px; }
.live-editor-actions .h-sec { min-width: 180px; margin: 0; }
.live-exercise-list { display: grid; gap: 9px; }
.live-exercise { display: grid; grid-template-columns: 38px 42px minmax(0,1fr) 38px; align-items: center; gap: 9px; padding: 12px; transition: transform .2s,box-shadow .2s,opacity .2s; }
.live-exercise.is-dragging { z-index: 10; opacity: .78; transform: scale(1.02); box-shadow: var(--sh-pop); }
.live-exercise__handle { width: 38px; height: 46px; border: 0; border-radius: 11px; background: var(--surface-2); color: var(--ink-45); font-size: 22px; cursor: grab; touch-action: none; }
.live-exercise__handle:active { cursor: grabbing; }
.live-exercise__number { width: 38px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; background: var(--ink); color: #fff; font-family: var(--head); font-size: 20px; }
.live-exercise__body { min-width: 0; }
.live-exercise__body b,.live-exercise__body small { display: block; }
.live-exercise__body small { margin-top: 3px; color: var(--ink-45); font-size: 11px; }
.live-skipped { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px dashed var(--line); border-radius: 13px; }
.live-skipped b,.live-skipped small { display: block; }
.live-plan-notice { display: none; margin-top: 4px; color: var(--jade); font-size: 10px; font-weight: 800; }
.live-plan-notice.is-on { display: block; animation: rise .35s var(--ease); }

.pupil {
  display: grid; grid-template-columns: 54px 1fr auto; gap: 16px; align-items: center;
  padding: 18px 20px; background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); box-shadow: var(--sh-1); cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.pupil:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.pupil-name { font-size: 16px; font-weight: 700; letter-spacing: -.015em; }
.pupil-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-45); margin-top: 3px; }
.pupil-side { text-align: right; display: grid; gap: 6px; justify-items: end; }

.flag { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.flag--ok   { color: var(--jade); }
.flag--warn { color: var(--gold); }
.flag--bad  { color: var(--accent); }

/* ─────────────────────────── фото ─────────────────────────── */

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.photo-item {
  position: relative; aspect-ratio: 3/4; border-radius: var(--r-md); overflow: hidden;
  background: var(--paper-deep); cursor: pointer; box-shadow: var(--sh-1);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.photo-item:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.photo-item:hover img { transform: scale(1.05); }
.photo-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 9px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.62));
  color: #fff; font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em;
  display: flex; justify-content: space-between; align-items: center;
}
.photo-del {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 9px;
  background: rgba(255,255,255,.9); border: none; cursor: pointer; color: var(--ink);
  display: grid; place-items: center; opacity: .9; transform: scale(1);
  transition: all .25s var(--spring); font-size: 14px; line-height: 1;
}
.photo-item:hover .photo-del { opacity: 1; transform: scale(1.06); }
.photo-feedback-badge {
  position: absolute; top: 8px; left: 8px; min-width: 27px; height: 27px; padding: 0 8px;
  border-radius: 999px; background: rgba(255,255,255,.94); color: var(--ink); box-shadow: var(--sh-1);
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
}

.drop {
  border: 1.5px dashed var(--line); border-radius: var(--r-lg); padding: 26px 20px;
  text-align: center; color: var(--ink-45); cursor: pointer; background: var(--surface-2);
  transition: all .25s var(--ease);
}
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.drop.is-uploading {
  pointer-events: none; border-color: var(--accent); background: var(--accent-soft);
  color: var(--ink); cursor: wait;
}
.upload-status {
  min-height: 48px; display: flex; align-items: center; justify-content: center;
  gap: 12px; font-size: 14px; font-weight: 600;
}
.upload-spinner {
  width: 24px; height: 24px; flex: none; border-radius: 50%;
  border: 3px solid rgba(240,74,35,.2); border-top-color: var(--accent);
  animation: upload-spin .75s linear infinite;
}
@keyframes upload-spin { to { transform: rotate(360deg); } }
.notification-list { display: grid; gap: 7px; }
.notification { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--ink); cursor: pointer; }
.notification.is-unread { background: var(--accent-soft); }
.notification-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-25); flex: none; }
.notification.is-unread .notification-dot { background: var(--accent); }
.notification b, .notification .tiny { display: block; }
.coach-feedback { display: grid; gap: 12px; margin-top: 18px; }
.feedback-heading { font-family: var(--head); font-size: 21px; }
.feedback-thread { display: grid; gap: 8px; }
.feedback-message { position: relative; padding: 12px 42px 12px 14px; border-radius: 13px; background: var(--surface-2); color: var(--ink); font-size: 13.5px; line-height: 1.45; text-align: left; }
.feedback-message__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 5px; color: var(--ink-45); font-size: 10.5px; }
.feedback-message__meta b { color: var(--ink); font-size: 12px; }
.feedback-message__delete { position: absolute; top: 9px; right: 8px; }
.feedback-compose { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: end; }
.feedback-compose textarea { width: 100%; min-height: 76px; resize: vertical; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: var(--surface); color: var(--ink); }
.feedback-preview { display: grid; gap: 3px; margin-top: 9px; padding: 9px 11px; border-left: 3px solid var(--accent); border-radius: 0 9px 9px 0; background: var(--accent-soft); font-size: 12px; }
.feedback-preview span { color: var(--ink-70); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-feedback { display: grid; gap: 8px; margin-top: 16px; padding: 14px; border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); text-align: left; }
.student-feedback--compact { margin-top: 10px; padding: 10px; box-shadow: none; background: var(--accent-soft); }
.student-feedback--compact .feedback-heading { font-size: 16px; }
.feedback-message--student { padding-right: 14px; background: var(--surface-2); }
.feedback-photo-modal { display: grid; gap: 18px; }
.feedback-photo-preview { padding: 12px; border-radius: 16px; background: #17181b; color: #fff; text-align: center; }
.feedback-photo-preview img { display: block; max-width: 100%; max-height: 58vh; margin: auto; border-radius: 11px; object-fit: contain; }
.feedback-photo-preview .tiny { margin-top: 9px; color: rgba(255,255,255,.72); }
.chat-shell { display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; height: clamp(520px,72dvh,760px); overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1); }
.chat-head { display: flex; align-items: center; gap: 11px; padding: 13px 15px; border-bottom: 1px solid var(--line-soft); background: rgba(255,255,255,.72); }
.chat-head .avatar { width: 38px; height: 38px; flex-basis: 38px; }
.chat-head b,.chat-head .tiny { display: block; }
.chat-thread { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 15px; background: linear-gradient(145deg,var(--surface-2),var(--paper)); scrollbar-gutter: stable; }
.chat-feed { min-height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.chat-older { align-self: center; display: block; margin: 2px auto 10px; padding: 7px 12px; border: 0; border-radius: 999px; background: rgba(255,255,255,.78); color: var(--ink-45); font: 10px var(--mono); cursor: pointer; }
.chat-older:disabled { opacity: .55; }
.chat-older[hidden] { display: none; }
.chat-empty { max-width: 390px; margin: 70px auto; color: var(--ink-45); font-size: 13px; line-height: 1.6; text-align: center; }
.chat-day { width: fit-content; margin: 4px auto 13px; padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.76); color: var(--ink-45); font-size: 10px; }
.chat-row { display: flex; margin-bottom: 8px; }
.chat-row.is-mine { justify-content: flex-end; }
.chat-bubble { position: relative; max-width: min(78%,560px); padding: 10px 11px 6px; border-radius: 7px 16px 16px 16px; background: var(--surface); color: var(--ink); box-shadow: 0 2px 10px rgba(30,27,24,.06); touch-action: pan-y; }
.chat-row.is-mine .chat-bubble { border-radius: 16px 7px 16px 16px; background: var(--ink); color: #fff; }
.chat-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.48; }
.chat-meta { display: flex; justify-content: flex-end; gap: 5px; margin-top: 4px; color: var(--ink-45); font-family: var(--mono); font-size: 8.5px; }
.chat-row.is-mine .chat-meta { color: rgba(255,255,255,.58); }
.chat-image { display: block; width: min(280px,58vw); padding: 0; overflow: hidden; border: 0; border-radius: 11px; background: transparent; cursor: pointer; }
.chat-image img { display: block; width: 100%; max-height: 360px; object-fit: cover; }
.chat-reactions { display: flex; flex-wrap: wrap; gap: 4px; min-height: 0; }
.chat-reactions:not(:empty) { margin: 7px 0 1px; }
.chat-reaction-chip { display: inline-flex; align-items: center; gap: 3px; height: 25px; padding: 0 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: var(--sh-1); animation: chat-reaction-in .28s var(--spring); }
.chat-reaction-chip.is-mine { border-color: rgba(240,74,35,.42); background: var(--accent-soft); }
.chat-row.is-mine .chat-reaction-chip { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.12); color: #fff; }
.chat-row.is-mine .chat-reaction-chip.is-mine { border-color: rgba(255,123,83,.7); background: rgba(240,74,35,.3); }
.chat-reaction-chip .num { font-size: 9px; }
.chat-reaction-picker { position: fixed; z-index: 110; display: flex; align-items: center; justify-content: space-evenly; padding: 7px; border: 1px solid rgba(20,20,24,.08); border-radius: 22px; background: rgba(255,255,255,.95); box-shadow: 0 16px 45px rgba(20,20,24,.28); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); opacity: 0; transform: translateY(8px) scale(.92); transform-origin: bottom center; transition: opacity .17s,transform .22s var(--spring); }
.chat-reaction-picker.is-on { opacity: 1; transform: translateY(0) scale(1); }
.chat-reaction-picker button { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 14px; background: transparent; font-size: 24px; cursor: pointer; opacity: 0; transform: translateY(7px) scale(.7); animation: chat-emoji-rise .35s var(--spring) forwards; animation-delay: calc(var(--i) * 35ms); }
.chat-reaction-picker button:hover,.chat-reaction-picker button.is-selected { background: var(--accent-soft); transform: translateY(-4px) scale(1.18); }
.chat-reaction-picker button.is-picked { animation: chat-reaction-pick .4s var(--spring); }
.chat-voice { position: relative; width: min(330px,64vw); display: grid; grid-template-columns: 40px minmax(130px,1fr) auto; grid-template-rows: auto auto; align-items: center; gap: 2px 9px; padding: 2px 0; }
.chat-voice audio { display: none; }
.chat-voice__play { grid-row: 1 / 3; width: 40px; height: 40px; display: grid; place-items: center; padding: 0 0 0 2px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; cursor: pointer; box-shadow: 0 5px 14px -7px rgba(240,74,35,.9); }
.chat-wave { position: relative; width: 100%; height: 29px; padding: 0; overflow: hidden; border: 0; background: transparent; cursor: pointer; }
.chat-wave__bars { width: 100%; height: 100%; display: flex; align-items: center; gap: 2px; color: var(--ink-25); }
.chat-wave__bars i { flex: 1 1 0; min-width: 1px; max-height: 100%; border-radius: 999px; background: currentColor; }
.chat-wave__fill { position: absolute; inset: 0 auto 0 0; width: 0; overflow: hidden; pointer-events: none; color: var(--accent); }
.chat-wave__fill .chat-wave__bars { width: var(--chat-wave-width,220px); color: inherit; }
.chat-row.is-mine .chat-wave__bars { color: rgba(255,255,255,.35); }
.chat-row.is-mine .chat-wave__fill,.chat-row.is-mine .chat-wave__fill .chat-wave__bars { color: #ff7652; }
.chat-voice__foot { display: flex; gap: 4px; color: var(--ink-45); font-size: 9px; }
.chat-row.is-mine .chat-voice__foot { color: rgba(255,255,255,.55); }
.chat-voice__speed { grid-column: 3; grid-row: 1 / 3; min-width: 37px; height: 29px; padding: 0 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-70); font: 10px var(--mono); cursor: pointer; }
.chat-row.is-mine .chat-voice__speed { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.1); color: #fff; }
.chat-speed-menu { position: absolute; z-index: 4; right: 0; bottom: calc(100% + 6px); display: flex; gap: 3px; padding: 5px; border-radius: 13px; background: var(--surface); box-shadow: var(--sh-pop); opacity: 0; pointer-events: none; transform: translateY(5px) scale(.95); transition: .16s; }
.chat-speed-menu.is-on { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.chat-speed-menu button { min-width: 38px; height: 31px; padding: 0 6px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: 10px var(--mono); cursor: pointer; }
.chat-speed-menu button:hover { background: var(--accent-soft); color: var(--accent-deep); }
.chat-status { min-height: 24px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 3px 12px; border-top: 1px solid var(--line-soft); }
.chat-status:empty { min-height: 8px; padding: 0; border-top: 0; }
.chat-status .upload-spinner { width: 16px; height: 16px; border-width: 2px; }
.chat-compose { position: relative; z-index: 2; display: grid; grid-template-columns: 38px 38px minmax(0,1fr) auto; gap: 7px; align-items: end; padding: 10px; border-top: 1px solid var(--line-soft); background: var(--surface); }
.chat-compose textarea { width: 100%; min-height: 40px; max-height: 112px; resize: none; overflow-y: auto; border: 1px solid var(--line); border-radius: 13px; padding: 9px 11px; background: var(--surface-2); color: var(--ink); }
.chat-tool { width: 38px; height: 38px; border-radius: 12px; font-size: 18px; }
.chat-tool:nth-child(2) { color: var(--accent); }
.chat-shell.is-recording .chat-tool:nth-child(2) { background: var(--accent); color: #fff; animation: chat-record 1.1s ease-in-out infinite; }
.chat-send { min-height: 40px; }
.chat-send__icon { display: none; font-size: 20px; line-height: 1; }
.modal.chat-gallery-overlay { padding: 0; background: #08090c; backdrop-filter: none; -webkit-backdrop-filter: none; }
.modal-box.chat-gallery-modal { position: relative; width: 100%; height: 100%; max-width: none; max-height: none; padding: 0; overflow: hidden; background: #08090c; border-radius: 0; box-shadow: none; transform: none; }
.modal.is-on .modal-box.chat-gallery-modal { transform: none; }
.chat-gallery { position: relative; color: #fff; }
.chat-gallery__stage { position: relative; width: 100vw; height: calc(100dvh - 52px - env(safe-area-inset-bottom)); display: grid; place-items: center; overflow: hidden; touch-action: pan-y; }
.chat-gallery__stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.chat-gallery__stage img.from-right { animation: chat-gallery-right .28s var(--ease); }
.chat-gallery__stage img.from-left { animation: chat-gallery-left .28s var(--ease); }
.chat-gallery__close,.chat-gallery__arrow { position: absolute; z-index: 3; display: grid; place-items: center; border: 0; background: rgba(17,18,22,.62); color: #fff; cursor: pointer; backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }
.chat-gallery__close { top: max(12px,env(safe-area-inset-top)); right: 12px; width: 40px; height: 40px; border-radius: 50%; font-size: 28px; }
.chat-gallery__arrow { top: 50%; width: 44px; height: 58px; margin-top: -29px; border-radius: 16px; font-size: 38px; }
.chat-gallery__arrow--prev { left: 12px; }.chat-gallery__arrow--next { right: 12px; }
.chat-gallery__meta { height: calc(52px + env(safe-area-inset-bottom)); display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 11px 18px env(safe-area-inset-bottom); color: rgba(255,255,255,.72); font-size: 11px; }
.chat-unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; }
@keyframes chat-record { 50% { transform: scale(.9); opacity: .72; } }
@keyframes chat-reaction-in { from { opacity: 0; transform: translateY(5px) scale(.75); } }
@keyframes chat-emoji-rise { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes chat-reaction-pick { 50% { transform: translateY(-12px) scale(1.5) rotate(-8deg); } }
@keyframes chat-gallery-right { from { opacity: .2; transform: translateX(45px) scale(.97); } }
@keyframes chat-gallery-left { from { opacity: .2; transform: translateX(-45px) scale(.97); } }

/* ─────────────────────────── недельный отчёт ─────────────────────────── */

.progress-actions { display: flex; align-items: center; gap: 7px; }
.report-head { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: start; gap: 14px; margin-bottom: 18px; }
.report-head__copy { min-width: 0; }
.report-head .h-sec { margin: 2px 0 7px; }
.report-head .display { font-size: clamp(38px,6vw,62px); }
.report-period { margin-top: 9px; color: var(--ink-45); font-size: 11px; }
.report-actions { display: flex; gap: 7px; }
.report-week-nav { display: grid; grid-template-columns: 40px minmax(0,1fr) 40px; align-items: center; gap: 12px; max-width: 520px; margin: 0 auto 16px; padding: 8px; border: 1px solid var(--line-soft); border-radius: 18px; background: rgba(255,255,255,.66); box-shadow: var(--sh-1); }
.report-week-nav > div { min-width: 0; text-align: center; }
.report-week-nav b,.report-week-nav small { display: block; }
.report-week-nav b { font-size: 13px; }
.report-week-nav small { margin-top: 2px; color: var(--ink-45); font-size: 9px; }
.report-week-nav .icon-btn { width: 38px; height: 38px; border-radius: 12px; }
.weekly-report { display: grid; gap: 14px; max-width: 920px; margin: 0 auto; }
.report-hero { position: relative; overflow: hidden; padding: 24px; border-radius: 28px; background: linear-gradient(145deg,#18191d,#0f1013); color: #fff; box-shadow: 0 22px 55px -34px rgba(8,8,10,.8); }
.report-hero::before { content: ''; position: absolute; width: 280px; aspect-ratio: 1; right: -105px; top: -150px; border-radius: 50%; background: radial-gradient(circle,rgba(240,74,35,.65),rgba(240,74,35,0) 68%); pointer-events: none; }
.report-person { position: relative; z-index: 1; display: grid; grid-template-columns: 58px minmax(0,1fr) auto; align-items: center; gap: 14px; }
.report-person .avatar { width: 58px; height: 58px; }
.report-person h2 { font-family: var(--head); font-size: 30px; line-height: 1; }
.report-person p { margin-top: 5px; max-width: 540px; color: rgba(255,255,255,.6); font-size: 11px; }
.report-kicker { display: block; margin-bottom: 4px; color: rgba(255,255,255,.45); font: 9px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.report-status { display: inline-flex; align-items: center; justify-content: center; padding: 5px 9px; border-radius: 999px; font: 9px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.report-status.draft { color: var(--ink-45); background: var(--surface-2); border: 1px solid var(--line-soft); }
.report-status.published { color: #087151; background: #dff6ed; border: 1px solid rgba(14,157,114,.12); }
.report-hero .report-status.draft { color: rgba(255,255,255,.65); background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.08); }
.report-hero .report-status.published { color: #8ff0d0; background: rgba(14,157,114,.18); border-color: rgba(79,218,173,.18); }
.report-highlights { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.report-highlight { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.76); font-size: 10px; }
.report-highlight i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); }
.report-highlight.good i { background: #52d4aa; box-shadow: 0 0 0 4px rgba(82,212,170,.1); }
.report-highlight.attention i { background: #ff7957; box-shadow: 0 0 0 4px rgba(240,74,35,.12); }
.report-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.report-metric { min-width: 0; padding: 17px; border: 1px solid var(--line-soft); border-radius: 20px; background: var(--surface); box-shadow: var(--sh-1); }
.report-metric__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--head); font-size: clamp(25px,4vw,36px); line-height: 1.05; }
.report-metric__label { margin-top: 7px; color: var(--ink-70); font-size: 11px; font-weight: 700; }
.report-metric__detail { margin-top: 3px; color: var(--ink-45); font-size: 8.5px; line-height: 1.35; }
.report-section { padding: 21px; border: 1px solid var(--line-soft); border-radius: 24px; background: var(--surface); box-shadow: var(--sh-1); }
.report-section > .h-sec:last-child { margin-bottom: 0; }
.report-workouts { display: grid; gap: 8px; }
.report-workout { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 11px; border-radius: 15px; background: var(--surface-2); }
.report-workout__index { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--ink); color: #fff; }
.report-workout b,.report-workout span { display: block; }
.report-workout b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.report-workout span { margin-top: 2px; color: var(--ink-45); font-size: 9px; }
.report-workout__volume { color: var(--accent-deep); font-size: 11px; white-space: nowrap; }
.report-body-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.report-body-stat { display: grid; gap: 2px; padding: 11px; border-radius: 14px; background: var(--surface-2); }
.report-body-stat > span { color: var(--ink-45); font-size: 9px; }
.report-body-stat > b { font-size: 14px; }
.report-body-stat > small { color: var(--ink-45); font-size: 8.5px; }
.report-body-stat > small.up { color: var(--jade); }
.report-body-stat > small.down { color: var(--accent-deep); }
.report-note { margin-top: 13px; padding: 12px 14px; border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; background: var(--accent-soft); color: var(--ink-70); font-size: 12px; white-space: pre-wrap; }
.report-photos { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px,160px); gap: 9px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 3px; }
.report-photo { position: relative; aspect-ratio: 4/5; overflow: hidden; border: 0; border-radius: 17px; background: var(--paper-deep); cursor: pointer; scroll-snap-align: start; }
.report-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.report-photo span { position: absolute; left: 7px; bottom: 7px; padding: 3px 7px; border-radius: 999px; background: rgba(10,10,12,.62); color: #fff; font: 8px var(--mono); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.report-photo-full { display: block; max-width: min(88vw,760px); max-height: 78dvh; object-fit: contain; border-radius: 18px; }
.report-nutrition { display: grid; grid-template-columns: minmax(190px,.8fr) 1.2fr; gap: 20px; align-items: center; }
.report-nutrition__score strong,.report-nutrition__score span,.report-nutrition__score small { display: block; }
.report-nutrition__score strong { font-family: var(--head); font-size: 42px; line-height: 1; }
.report-nutrition__score span { margin-top: 6px; color: var(--ink-70); font-size: 11px; }
.report-nutrition__score small { margin-top: 5px; color: var(--ink-45); font-size: 9px; }
.report-progress { height: 7px; margin-top: 11px; overflow: hidden; border-radius: 999px; background: var(--paper-deep); }
.report-progress i { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--accent),#ff8a5f); transition: width .55s var(--ease); }
.report-ratings { display: grid; gap: 8px; }
.report-rating { display: grid; grid-template-columns: 96px minmax(80px,1fr) 15px; align-items: center; gap: 8px; color: var(--ink-70); font-size: 10px; }
.report-rating__dots { display: grid; grid-template-columns: repeat(5,1fr); gap: 3px; }
.report-rating__dots i { height: 6px; border-radius: 999px; background: var(--paper-deep); }
.report-rating__dots i.is-on { background: var(--accent); }
.report-rating b { color: var(--ink); font-size: 9px; }
.report-coach-note textarea { min-height: 118px; background: var(--surface-2); }
.report-publish-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.report-coach-copy { padding: 17px; border-radius: 17px; background: linear-gradient(145deg,var(--surface-2),var(--accent-soft)); }
.report-coach-copy p { font-family: var(--head); font-size: 20px; line-height: 1.45; white-space: pre-wrap; }
.report-footer { display: flex; justify-content: space-between; gap: 14px; padding: 12px 5px; color: var(--ink-45); font: 8.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; }

.btn--block { width: 100%; margin-top: 16px; }
.btn--danger { color: var(--accent-deep); }
.lead { max-width: 620px; margin-top: 8px; color: var(--ink-45); line-height: 1.55; }
.pwa-install { max-width: 620px; margin: 18px 0; }
.pwa-install-row { display: grid; grid-template-columns: 58px minmax(0,1fr); align-items: center; gap: 13px; }
.pwa-install-row img { width: 58px; height: 58px; border-radius: 16px; }
.pwa-install-row p { margin-top: 4px; line-height: 1.45; }

body.onboarding-open { overflow: hidden; }
.pwa-onboarding {
  position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 20px;
  background: rgba(21,22,26,.66); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; transition: opacity .28s var(--ease);
}
.pwa-onboarding.is-on { opacity: 1; }
.pwa-onboarding__sheet {
  width: min(100%,480px); max-height: min(92dvh,780px); overflow: auto; padding: 26px;
  border: 1px solid rgba(255,255,255,.7); border-radius: 30px; background: var(--surface);
  box-shadow: 0 32px 90px rgba(13,14,18,.38); transform: translateY(20px) scale(.97);
  transition: transform .38s var(--spring); overscroll-behavior: contain;
}
.pwa-onboarding.is-on .pwa-onboarding__sheet { transform: translateY(0) scale(1); }
.pwa-onboarding__brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.pwa-onboarding__brand img { width: 68px; height: 68px; border-radius: 20px; box-shadow: 0 12px 28px rgba(240,74,35,.22); }
.pwa-onboarding__brand span,.pwa-onboarding__brand b { display: block; }
.pwa-onboarding__brand span { margin-bottom: 4px; color: var(--accent-deep); font: 10px var(--mono); letter-spacing: .12em; }
.pwa-onboarding__brand b { font-family: var(--head); font-size: 25px; font-weight: 400; }
.pwa-onboarding__sheet h1 { font-family: var(--head); font-size: clamp(36px,10vw,52px); font-weight: 400; line-height: .98; letter-spacing: -.03em; }
.pwa-onboarding__lead { margin: 12px 0 20px; color: var(--ink-45); font-size: 14px; line-height: 1.55; }
.pwa-benefits { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 20px; }
.pwa-benefit { min-width: 0; padding: 13px 10px; border-radius: 16px; background: var(--surface-2); }
.pwa-benefit > span { width: 30px; height: 30px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-deep); font-size: 16px; }
.pwa-benefit b,.pwa-benefit small { display: block; }
.pwa-benefit b { font-size: 11.5px; line-height: 1.25; }
.pwa-benefit small { margin-top: 4px; color: var(--ink-45); font-size: 9.5px; line-height: 1.35; }
.pwa-instructions { display: grid; gap: 8px; margin: 4px 0 18px; }
.pwa-instruction { display: grid; grid-template-columns: 32px minmax(0,1fr) 36px; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line-soft); border-radius: 16px; }
.pwa-instruction__number { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font: 12px var(--mono); }
.pwa-instruction b,.pwa-instruction small { display: block; }
.pwa-instruction b { font-size: 12.5px; }
.pwa-instruction small { margin-top: 2px; color: var(--ink-45); font-size: 10px; line-height: 1.35; }
.pwa-instruction i { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--accent-deep); font: normal 18px var(--mono); }
.pwa-onboarding__primary { min-height: 50px; margin-top: 4px; }
.pwa-onboarding__later { display: block; margin: 13px auto 0; padding: 6px 10px; border: 0; background: transparent; color: var(--ink-45); font: 11px var(--mono); cursor: pointer; }
.pwa-onboarding__later:hover { color: var(--ink); }
.pwa-permission-help { margin: 4px 0 18px; padding: 14px; border-radius: 16px; background: var(--accent-soft); }
.pwa-permission-help b,.pwa-permission-help p { display: block; }
.pwa-permission-help p { margin-top: 5px; color: var(--ink-70); font-size: 11px; line-height: 1.45; }
.pwa-install-banner {
  position: fixed; z-index: 130; top: max(10px,env(safe-area-inset-top)); left: 50%; width: min(480px,calc(100% - 20px));
  display: grid; grid-template-columns: 46px minmax(0,1fr) auto 30px; align-items: center; gap: 11px; padding: 9px;
  border: 1px solid rgba(255,255,255,.78); border-radius: 19px; background: rgba(255,255,255,.94); box-shadow: 0 16px 48px rgba(20,20,24,.2);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); opacity: 0; transform: translate(-50%,-18px) scale(.97); pointer-events: none;
  transition: opacity .2s var(--ease),transform .28s var(--spring);
}
.pwa-install-banner.is-on { opacity: 1; transform: translate(-50%,0) scale(1); pointer-events: auto; }
.pwa-install-banner img { width: 46px; height: 46px; border-radius: 13px; box-shadow: 0 7px 18px rgba(240,74,35,.18); }
.pwa-install-banner__copy b,.pwa-install-banner__copy span { display: block; }
.pwa-install-banner__copy b { font-size: 13px; }
.pwa-install-banner__copy span { margin-top: 3px; color: var(--ink-45); font-size: 10px; line-height: 1.3; }
.pwa-install-banner__button { min-height: 38px; padding-inline: 15px; }
.pwa-install-banner__close { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-45); font-size: 22px; cursor: pointer; }
.pwa-install-banner__close:hover { background: var(--surface-2); color: var(--ink); }

.data-export-card {
  max-width: 620px;
  margin: 18px 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}
.data-export-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ink);
  font-size: 24px;
  line-height: 1;
}
.data-export-card p { margin: 5px 0 0; line-height: 1.45; }
.data-export-card .btn { white-space: nowrap; }

@media (max-width: 540px) {
  .pwa-install-banner { top: max(7px,env(safe-area-inset-top)); grid-template-columns: 42px minmax(0,1fr) auto 28px; gap: 8px; padding: 8px; }
  .pwa-install-banner img { width: 42px; height: 42px; border-radius: 12px; }
  .pwa-install-banner__button { min-height: 36px; padding-inline: 12px; }
  .pwa-onboarding { align-items: end; padding: 0; }
  .pwa-onboarding__sheet {
    width: 100%; max-height: calc(100dvh - max(10px,env(safe-area-inset-top))); padding: 22px 18px max(18px,env(safe-area-inset-bottom));
    border-width: 1px 0 0; border-radius: 28px 28px 0 0; transform: translateY(36px);
  }
  .pwa-onboarding__brand { margin-bottom: 17px; }
  .pwa-onboarding__brand img { width: 58px; height: 58px; border-radius: 18px; }
  .pwa-onboarding__sheet h1 { font-size: 42px; }
  .pwa-onboarding__lead { margin: 9px 0 16px; font-size: 13px; }
  .pwa-benefits { gap: 6px; margin-bottom: 15px; }
  .pwa-benefit { padding: 10px 8px; }
  .pwa-benefit > span { margin-bottom: 7px; }
  .pwa-benefit small { display: none; }
  .pwa-instructions { gap: 6px; margin-bottom: 14px; }
  .pwa-instruction { padding: 9px; }
  .data-export-card { grid-template-columns: 48px minmax(0, 1fr); }
  .data-export-card .btn { grid-column: 1 / -1; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-onboarding,.pwa-onboarding__sheet { transition: none; }
}
.push-card { max-width: 620px; margin: 18px 0; }
.push-stage { display: grid; gap: 13px; }
.push-status { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 12px; }
.push-status p { margin-top: 3px; line-height: 1.45; }
.push-status__icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-45); font-size: 20px; }
.push-status__icon.is-on { background: #e6f5ea; color: #227a3b; }
.push-actions { margin-top: 2px; }
.program-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.program-editor { display: grid; gap: 14px; }
.program-main-card { display: grid; gap: 13px; }
.program-weeks { max-width: 150px; }
.program-day { display: grid; gap: 14px; }
.program-day__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.program-day__head .h-sec { margin-bottom: 2px; }
.program-day__fields { display: grid; grid-template-columns: 90px 90px minmax(180px,1fr); gap: 9px; }
.exercise-editor-list { display: grid; gap: 8px; }
.exercise-editor { display: grid; grid-template-columns: minmax(160px,2fr) 90px minmax(120px,1fr) 36px; gap: 8px; align-items: end; padding: 10px; border-radius: 13px; background: var(--surface-2); }
.exercise-editor input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--surface); color: var(--ink); }
.mini-field { display: grid; gap: 4px; }
.mini-field > span { color: var(--ink-45); font-family: var(--mono); font-size: 8.5px; letter-spacing: .07em; text-transform: uppercase; }
.program-add-exercise { justify-self: start; }
.program-editor-actions { position: sticky; z-index: 24; bottom: 10px; display: flex; justify-content: space-between; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.9); box-shadow: var(--sh-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.program-preview { margin-top: 14px; }
.program-preview-day h3 { font-size: 18px; }
.program-preview-exercises { display: grid; gap: 8px; margin-top: 14px; }
.program-preview-exercises > div { display: flex; justify-content: space-between; gap: 14px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.program-preview-exercises span { font-size: 12px; white-space: nowrap; }
.template-picker { display: grid; gap: 8px; margin-top: 16px; max-height: 52vh; overflow: auto; }
.template-pick { width: 100%; display: grid; grid-template-columns: 40px minmax(0,1fr) 26px; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.template-pick.is-selected { border-color: var(--ink); background: var(--surface-2); }
.template-pick__icon { width: 38px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; background: var(--paper-deep); font-family: var(--head); font-size: 20px; }
.template-pick b,.template-pick small { display: block; }
.template-pick small { margin-top: 2px; color: var(--ink-45); font-size: 11px; }
.template-pick__check { justify-self: center; color: var(--accent); font-size: 19px; }
.library-kind-tabs { width: min(100%,360px); display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 24px; padding: 4px; border-radius: 16px; background: var(--paper-deep); }
.library-kind-tabs button { min-height: 42px; padding: 8px 14px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-45); font: 600 13px var(--ui); cursor: pointer; transition: background .18s,color .18s,box-shadow .18s; }
.library-kind-tabs button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.library-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.library-head__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(290px,1fr)); gap: 12px; margin: 9px 0 28px; }
.template-card { width: 100%; min-height: 126px; display: grid; grid-template-columns: 48px minmax(0,1fr) 20px; align-items: center; gap: 13px; padding: 17px; color: var(--ink); text-align: left; font: inherit; cursor: pointer; transition: transform .2s var(--ease),box-shadow .2s var(--ease),border-color .2s var(--ease); }
.template-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--ink-25); }
.template-card__mark { width: 46px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 15px; background: var(--ink); color: #fff; font-family: var(--head); font-size: 24px; }
.template-card__mark--nutrition { background: var(--accent); }
.template-card__body,.template-card__body > * { display: block; min-width: 0; }
.template-card__body > b { margin: 3px 0 4px; font-size: 16px; }
.template-card__body > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.template-card__type { color: var(--accent); font-family: var(--mono); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; }
.template-card__meta { margin-top: 8px; color: var(--ink-45); font-size: 10.5px; }
.template-card__arrow { color: var(--ink-25); font-size: 26px; }
.library-onboarding { display: flex; align-items: center; gap: 16px; margin: 8px 0 28px; }
.library-onboarding__icon { flex: 0 0 auto; width: 52px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 17px; background: var(--accent-soft); color: var(--accent); font-size: 25px; }
.library-onboarding p { margin-top: 4px; }
.library-system-title { margin-top: 14px; }
.template-detail-head { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 18px; }
.template-detail-head .icon-btn { margin-top: 5px; }
.template-info { display: grid; gap: 3px; margin-bottom: 14px; }
.assignment-list { display: grid; gap: 8px; max-height: 52vh; margin-top: 16px; overflow: auto; }
.assignment-person { display: grid; grid-template-columns: 24px 40px minmax(0,1fr); align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line-soft); border-radius: 14px; cursor: pointer; }
.assignment-person:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.assignment-person input { width: 18px; height: 18px; accent-color: var(--accent); }
.assignment-person .avatar { width: 40px; height: 40px; }
.assignment-person b,.assignment-person small { display: block; }
.assignment-person small { margin-top: 2px; color: var(--ink-45); font-size: 10.5px; }
@media (max-width: 560px) {
  .program-actions { flex-wrap: nowrap; margin-inline: -14px; padding: 0 14px 4px; overflow-x: auto; scrollbar-width: none; }
  .program-actions::-webkit-scrollbar { display: none; }
  .program-actions .btn { flex: 0 0 auto; min-height: 40px; }
  .program-main-card .grid-2 { grid-template-columns: minmax(0,1fr) 82px; }
  .program-weeks { max-width: none; }
  .program-day__fields { grid-template-columns: 66px 66px minmax(0,1fr); gap: 7px; }
  .program-day__fields .field input { padding-inline: 9px; }
  .exercise-editor { grid-template-columns: 80px minmax(0,1fr) 36px; align-items: end; }
  .exercise-editor__name { grid-column: 1 / 3; }
  .exercise-editor__remove { grid-column: 3; grid-row: 1; }
  .exercise-editor > .mini-field:not(.exercise-editor__reps) { grid-column: 1; grid-row: 2; }
  .exercise-editor__reps { grid-column: 2 / 4; grid-row: 2; }
  .program-editor input { font-size: 16px; }
  .program-editor-actions { bottom: calc(82px + env(safe-area-inset-bottom)); }
  .program-editor-actions .btn { flex: 1 1 0; padding-inline: 12px; }
  .library-head { display: grid; margin-bottom: 24px; }
  .library-head__actions { justify-content: stretch; }
  .library-head__actions .btn { flex: 1 1 100%; }
  .template-grid { grid-template-columns: 1fr; }
  .template-card { min-height: 112px; padding: 14px; }
  .template-detail-head .display { font-size: 36px; }
  .program-preview-exercises > div { align-items: baseline; }
  .feedback-compose { grid-template-columns: 1fr; }
  .feedback-compose .btn { width: 100%; }
  .feedback-photo-preview img { max-height: 48vh; }
  .chat-shell { height: calc(100dvh - 190px - env(safe-area-inset-bottom)); min-height: 320px; max-height: none; border-radius: 17px; }
  .chat-thread { padding-inline: 10px; }
  .chat-bubble { max-width: 88%; }
  .chat-compose { grid-template-columns: 38px 38px minmax(0,1fr) 40px; padding: 8px; gap: 6px; }
  .chat-compose textarea { font-size: 16px; }
  .chat-send { width: 40px; min-width: 40px; height: 40px; padding: 0; border-radius: 13px; }
  .chat-send__label { display: none; }
  .chat-send__icon { display: block; }
  .chat-voice { width: min(275px,72vw); grid-template-columns: 38px minmax(105px,1fr) auto; gap: 2px 7px; }
  .chat-voice__play { width: 38px; height: 38px; }
  .chat-wave__bars { gap: 1.5px; }
  .chat-gallery__arrow { display: none; }
}

/* ─────────────────────────── питание ─────────────────────────── */
.nutri-summary { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: center; }
.nutri-ring { --p: 0%; width: 138px; aspect-ratio: 1; border-radius: 50%; padding: 12px; background: conic-gradient(var(--accent) var(--p), var(--paper-deep) 0); }
.nutri-ring > div { width: 100%; height: 100%; border-radius: 50%; background: var(--surface); display: grid; place-content: center; text-align: center; }
.nutri-ring b { font-family: var(--head); font-size: 30px; line-height: 1; }
.nutri-ring span { font-size: 10px; color: var(--ink-45); margin-top: 4px; }
.nutri-targets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nutri-target { display: grid; grid-template-columns: 34px 1fr; gap: 9px; align-items: center; }
.nutri-target b,.nutri-target span { display: block; }
.nutri-target i { display: block; height: 4px; border-radius: 9px; background: var(--paper-deep); margin-top: 5px; overflow: hidden; }
.nutri-target i b { display: block; height: 100%; background: currentColor; border-radius: inherit; }
.nutri-icon { width: 32px; height: 32px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; }
.nutri-icon svg { width: 19px; height: 19px; }
.nutri-meals { display: grid; gap: 12px; }
.nutri-meal { transition: border-color .2s, opacity .2s; }
.nutri-meal.is-eaten { border-color: rgba(33,145,111,.35); }
.nutri-meal.is-skipped { opacity: .58; }
.nutri-items { display: grid; gap: 5px; margin-top: 12px; }
.nutri-items > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.nutri-week { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; margin: 14px 0; }
.nutri-week button { border: 1px solid var(--line-soft); background: var(--surface); border-radius: 12px; padding: 9px 4px; color: var(--ink-45); cursor: pointer; font-weight: 700; }
.nutri-week button small { display: block; font-size: 8px; font-weight: 500; margin-top: 2px; }
.nutri-week button.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.nutri-target-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.nutri-item-edit { display: grid; grid-template-columns: minmax(150px,1fr) 90px 76px 34px; gap: 8px; align-items: center; }
.nutri-item-edit select,.nutri-item-edit input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px; color: var(--ink); }
.nutrition-action-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.nutrition-save-bar { justify-content: space-between; margin-top: 16px; }
.recipe-list { display: grid; gap: 10px; margin-top: 14px; }
.recipe-card { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 10px; align-items: center; padding: 13px 14px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface-2); color: var(--ink); text-align: left; }
.recipe-card--button { width: 100%; cursor: pointer; font: inherit; }
.recipe-card--button:hover { border-color: var(--ink-25); transform: translateY(-1px); }
.recipe-card__main { min-width: 0; }
.recipe-kcal { font-weight: 800; white-space: nowrap; }
.recipe-macros { margin-top: 4px; color: var(--ink-45); font-size: 12px; white-space: nowrap; }
.recipe-editor-items { display: grid; gap: 8px; }
.recipe-item-row { display: grid; grid-template-columns: minmax(140px,1fr) 90px 16px 34px; gap: 7px; align-items: center; }
.recipe-item-row select,.recipe-item-row input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px; color: var(--ink); }
.copy-day-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 16px; }
.copy-day-option { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 8px; border: 1px solid var(--line-soft); border-radius: 12px; cursor: pointer; }
.copy-day-option.is-disabled { opacity: .4; cursor: default; }
@media (max-width:560px) {
  .nutri-summary { grid-template-columns: 1fr; justify-items: center; }
  .nutri-targets { width: 100%; }
  .nutri-target-grid { grid-template-columns: 1fr 1fr; }
  .nutri-item-edit { grid-template-columns: 1fr 72px 66px 34px; }
  .nutrition-action-bar .btn { flex: 1 1 auto; }
  .nutrition-save-bar .btn { flex: 1 1 100%; }
  .recipe-card { grid-template-columns: 1fr auto; }
  .recipe-card .recipe-macros { white-space: normal; }
  .recipe-card > .icon-btn { grid-column: 2; }
  .recipe-item-row { grid-template-columns: minmax(110px,1fr) 70px 12px 34px; }
  .copy-day-grid { grid-template-columns: repeat(3,1fr); }
}

/* ─────────────────────────── календарь тренировок ─────────────────────────── */

.schedule-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.schedule-head .lead { max-width: 650px; margin-top: 8px; }
.schedule-controls { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.schedule-range { flex: 1; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--ink-45); }
.schedule-week {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; padding: 9px;
  background: rgba(255,255,255,.56); border: 1px solid var(--line-soft); border-radius: 22px; box-shadow: var(--sh-1);
  margin-bottom: 18px;
}
.schedule-day {
  min-width: 0; height: 86px; display: grid; place-items: center; align-content: center; gap: 2px;
  border: 1px solid transparent; border-radius: 16px; background: transparent; color: var(--ink-45); cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--spring);
}
.schedule-day span { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.schedule-day b { font-size: 20px; font-weight: 500; }
.schedule-day i { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 999px; font: normal 10px var(--mono); }
.schedule-day:hover { background: var(--surface); color: var(--ink); }
.schedule-day.is-today { border-color: rgba(240,74,35,.28); }
.schedule-day.is-selected { background: var(--ink); color: #fff; box-shadow: 0 8px 20px -12px rgba(21,22,26,.8); }
.schedule-day.is-selected i { background: rgba(255,255,255,.16); }
.schedule-day.is-drop-target { background: var(--accent); color: #fff; transform: translateY(-4px) scale(1.03); border-color: var(--accent); }
.schedule-agenda { padding: 22px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--sh-1); }
.schedule-agenda__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.schedule-agenda__head .h-sec { margin-bottom: 3px; }
.schedule-agenda__head h2 { font-family: var(--head); font-size: 25px; font-weight: 400; }
.schedule-card {
  display: grid; grid-template-columns: 40px 38px minmax(0,1fr) 18px; align-items: center; gap: 12px;
  width: 100%; padding: 13px; border: 1px solid var(--line-soft); border-radius: 18px; background: var(--surface-2);
  cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s, opacity .25s; text-align: left;
}
.schedule-card + .schedule-card { margin-top: 9px; }
.schedule-card:hover { transform: translateY(-2px); box-shadow: var(--sh-1); }
.schedule-card.is-dragging { opacity: .55; transform: scale(.98); }
.schedule-card--cancelled { opacity: .58; }
.schedule-card--cancelled .schedule-card__title { text-decoration: line-through; }
.schedule-card--active { border-color: rgba(240,74,35,.35); background: var(--accent-soft); }
.schedule-card--completed { background: var(--jade-soft); }
.schedule-drag {
  width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 13px;
  background: var(--surface); color: var(--ink-45); cursor: grab; font-size: 22px; line-height: 1; touch-action: none; user-select: none;
}
.schedule-drag:active { cursor: grabbing; }
.schedule-drag--locked { color: var(--jade); border-color: transparent; background: rgba(255,255,255,.58); cursor: default; font-size: 15px; }
.schedule-card__body { min-width: 0; }
.schedule-card__line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.schedule-card__line b { font-size: 13px; }
.schedule-card__title { font-size: 16px; font-weight: 750; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-card__meta { margin-top: 3px; font-size: 10.5px; color: var(--ink-45); }
.schedule-card__note { margin-top: 5px; font-size: 11.5px; color: var(--ink-70); }
.schedule-status { display: inline-flex; padding: 3px 7px; border-radius: 999px; background: var(--surface); color: var(--ink-45); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.schedule-status--accent { background: var(--accent); color: #fff; }
.schedule-status--jade { background: var(--jade); color: #fff; }
.schedule-status--muted { background: var(--paper-deep); color: var(--ink-45); }
.schedule-empty {
  width: 100%; min-height: 126px; display: grid; place-items: center; align-content: center; gap: 3px;
  border: 1.5px dashed var(--line); border-radius: 18px; background: var(--surface-2); color: var(--ink-45); cursor: pointer;
}
.schedule-empty span { font-size: 25px; color: var(--accent); }
.schedule-empty b { color: var(--ink); }
.schedule-empty small { font-size: 11px; }
.schedule-empty:disabled { cursor: default; opacity: .65; }
.schedule-editor__actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.schedule-editor__actions .btn--block { width: auto; flex: 1; }

.brief-schedule { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.brief-schedule__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.brief-schedule__item { width: 100%; display: grid; grid-template-columns: 46px 34px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 8px; border: 0; border-radius: 13px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.brief-schedule__item:hover { background: var(--surface-2); }
.brief-schedule__item > .num { color: var(--accent); font-weight: 600; }
.brief-schedule__item .avatar { width: 34px; height: 34px; }
.brief-schedule__item b,.brief-schedule__item small { display: block; }
.brief-schedule__item small { color: var(--ink-45); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.student-schedule { margin-bottom: 24px; }
.student-schedule__eyebrow { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font: 10px var(--mono); color: var(--accent-deep); text-transform: uppercase; letter-spacing: .12em; }
.student-schedule__pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(240,74,35,.1); }
.student-schedule__hero {
  width: 100%; display: grid; grid-template-columns: 64px minmax(0,1fr) auto; gap: 16px; align-items: center;
  padding: 17px 19px; border: 1px solid rgba(240,74,35,.22); border-radius: var(--r-lg); color: var(--ink); text-align: left; cursor: pointer;
  background: linear-gradient(135deg, var(--surface), var(--accent-soft)); box-shadow: var(--sh-1);
}
.student-schedule__date { width: 64px; height: 64px; display: grid; place-items: center; align-content: center; border-radius: 19px; background: var(--ink); color: #fff; }
.student-schedule__date strong { font-size: 24px; line-height: 1; }
.student-schedule__date span { margin-top: 2px; font: 9px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.student-schedule__body b,.student-schedule__body span,.student-schedule__body small { display: block; }
.student-schedule__body b { font-size: 17px; }
.student-schedule__body span { margin-top: 3px; color: var(--ink-45); font-size: 11px; }
.student-schedule__body small { margin-top: 5px; color: var(--ink-70); }
.student-schedule__go { font-size: 12px; font-weight: 700; color: var(--accent-deep); white-space: nowrap; }
.student-schedule .acc { margin-top: 8px; }
.student-schedule__list { display: grid; gap: 6px; }
.student-schedule__row { display: grid; grid-template-columns: 112px minmax(0,1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 10px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--ink); cursor: pointer; text-align: left; }
.student-schedule__row > span,.student-schedule__row > small { color: var(--ink-45); font-size: 10px; }

/* ─────────────────────────── модалка / лайтбокс ─────────────────────────── */

.modal {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px;
  background: rgba(21,22,26,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.modal.is-on { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--surface); border-radius: var(--r-xl); padding: 26px; width: 100%; max-width: 460px;
  box-shadow: var(--sh-pop); transform: translateY(16px) scale(.97); transition: transform .4s var(--spring);
  max-height: 88vh; overflow: auto;
}
.modal.is-on .modal-box { transform: translateY(0) scale(1); }
.modal-title { font-family: var(--head); font-size: 25px; margin-bottom: 14px; }
.modal-box--wide { max-width: 720px; }
.lightbox img { max-width: min(92vw, 620px); max-height: 86vh; border-radius: var(--r-md); box-shadow: var(--sh-pop); display: block; }

/* ─────────────────────────── тост ─────────────────────────── */

.toast-stack { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 180; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
body.focus-mode .toast-stack { bottom: calc(150px + env(safe-area-inset-bottom)); }
.toast {
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px;
  font-size: 13px; font-weight: 500; box-shadow: var(--sh-pop); white-space: nowrap;
  animation: toastIn .45s var(--spring);
}
.toast--bad { background: var(--accent-deep); }
.toast--good { background: var(--jade); }
@keyframes toastIn { from { transform: translateY(20px) scale(.9); opacity: 0; } }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastOut { to { transform: translateY(10px); opacity: 0; } }

/* ─────────────────────────── финиш тренировки ─────────────────────────── */

.finale { text-align: center; padding: 30px 0; position: relative; }
.finale-burst {
  position: absolute; left: 50%; top: 74px; width: 260px; height: 260px; margin: -130px 0 0 -130px;
  border-radius: 50%; background: radial-gradient(circle, rgba(240,74,35,.28), transparent 68%);
  animation: burst 1.4s var(--ease) forwards; pointer-events: none;
}
@keyframes burst { from { transform: scale(.2); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.finale-num { font-family: var(--head); font-size: 78px; line-height: 1; color: var(--accent); }

.pr-line {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r-md);
  background: var(--gold-soft); color: var(--gold); font-size: 13.5px; text-align: left;
}

/* ─────────────────────────── появление ─────────────────────────── */

.reveal { animation: rise .65s var(--ease) both; }
.stagger > * { animation: rise .55s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .03s; }
.stagger > *:nth-child(2) { animation-delay: .07s; }
.stagger > *:nth-child(3) { animation-delay: .11s; }
.stagger > *:nth-child(4) { animation-delay: .15s; }
.stagger > *:nth-child(5) { animation-delay: .19s; }
.stagger > *:nth-child(6) { animation-delay: .23s; }
.stagger > *:nth-child(7) { animation-delay: .27s; }
.stagger > *:nth-child(8) { animation-delay: .31s; }
.stagger > *:nth-child(n+9) { animation-delay: .35s; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.view-swap { animation: swapIn .4s var(--ease) both; }
@keyframes swapIn { from { opacity: 0; transform: translateY(8px); } }

.skeleton {
  background: linear-gradient(100deg, var(--paper-deep) 30%, var(--surface-2) 50%, var(--paper-deep) 70%);
  background-size: 220% 100%; animation: shimmer 1.4s infinite linear; border-radius: var(--r-sm);
}
@keyframes shimmer { to { background-position: -220% 0; } }

.empty { text-align: center; padding: 44px 20px; color: var(--ink-45); }
.empty-ico { font-size: 30px; margin-bottom: 10px; opacity: .35; }

/* ─────────────────────────── лендинг ─────────────────────────── */

.hero { padding: 70px 0 54px; position: relative; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono);
  font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-45);
  padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-soft);
  box-shadow: var(--sh-1); margin-bottom: 24px;
}
.hero-lead { font-size: 17.5px; color: var(--ink-70); max-width: 540px; margin: 22px 0 30px; line-height: 1.55; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.feature { padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--sh-1); }
.feature-ico {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--accent-soft); color: var(--accent);
}
.feature h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 6px; letter-spacing: -.015em; }
.feature p { font-size: 13.5px; color: var(--ink-45); line-height: 1.5; }

.mock {
  border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--sh-3);
  border: 1px solid var(--line-soft); overflow: hidden; padding: 20px;
}

/* ─────────────────────────── адаптив ─────────────────────────── */

@media (max-width: 860px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .hide-sm { display: none !important; }
  .student-app .shell,.coach-app .shell { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
  .student-app .topbar,.coach-app .topbar { padding: 12px 0; margin-bottom: 18px; }
  .student-app .topbar.is-stuck,.coach-app .topbar.is-stuck { padding: 9px 0; }
  .student-app .topbar-inner,.coach-app .topbar-inner { flex-wrap: nowrap; }
  .student-app .topbar-inner > .tabs,.coach-app .topbar-inner > .tabs,
  .student-app > .tabs.app-bottom-nav,.coach-app > .tabs.app-bottom-nav {
    position: fixed; z-index: 70; left: 50%; bottom: max(8px,env(safe-area-inset-bottom));
    width: min(calc(100% - 18px),540px); transform: translateX(-50%);
    display: flex; align-items: stretch; gap: 2px; padding: 6px;
    border: 1px solid rgba(25,25,28,.09); border-radius: 23px;
    background: rgba(255,255,255,.9); box-shadow: 0 14px 38px rgba(22,20,18,.2);
    backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  }
  .student-app .topbar-inner > .tabs button,.coach-app .topbar-inner > .tabs button,
  .student-app > .tabs.app-bottom-nav button,.coach-app > .tabs.app-bottom-nav button {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; padding: 6px 3px 5px; border-radius: 16px; font-size: 9px; line-height: 1.1;
  }
  .student-app .topbar-inner > .tabs button.is-active,.coach-app .topbar-inner > .tabs button.is-active,
  .student-app > .tabs.app-bottom-nav button.is-active,.coach-app > .tabs.app-bottom-nav button.is-active { background: var(--accent-soft); color: var(--accent-deep); }
  .student-app .topbar-inner > .tabs .tab-pill,.coach-app .topbar-inner > .tabs .tab-pill,
  .student-app > .tabs.app-bottom-nav .tab-pill,.coach-app > .tabs.app-bottom-nav .tab-pill { display: none; }
  .student-app .topbar-inner > .tabs .tab-icon,.coach-app .topbar-inner > .tabs .tab-icon,
  .student-app > .tabs.app-bottom-nav .tab-icon,.coach-app > .tabs.app-bottom-nav .tab-icon { display: block; }
  .student-app .topbar-inner > .tabs .chat-unread,.coach-app .topbar-inner > .tabs .chat-unread,
  .student-app > .tabs.app-bottom-nav .chat-unread,.coach-app > .tabs.app-bottom-nav .chat-unread { position: absolute; top: 2px; right: 8px; }
  .student-tabs {
    position: sticky; z-index: 25; top: 62px; width: calc(100% + 28px); max-width: none; margin-left: -14px;
    padding: 7px 14px; border-radius: 0; overflow-x: auto; scroll-snap-type: x proximity;
    background: rgba(242,239,234,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .student-tabs button { padding: 8px 13px; scroll-snap-align: start; }
}

@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .shell { padding: 0 14px 130px; }
  .topbar-inner { padding: 0 14px; }
  .card--pad { padding: 18px; }
  .auth-card { padding: 26px 20px; }
  .set-row { grid-template-columns: 26px 1fr 1fr 46px; gap: 6px; }
  .set-check { width: 40px; height: 40px; }
  .set-input input { font-size: 16px; padding: 12px 4px; }  /* 16px — iOS не зумит поле */
  .pupil { grid-template-columns: 44px 1fr; }
  .pupil-side { grid-column: 1 / -1; justify-items: start; text-align: left; }
  .daily-brief { margin-inline: -2px; }
  .briefing-stats { grid-template-columns: 1fr 1fr; }
  .live-now__person { grid-template-columns: 36px minmax(0,1fr); }
  .live-now__action { grid-column: 2; }
  .live-editor-head { grid-template-columns: 38px minmax(0,1fr); }
  .live-editor-head .live-status { grid-column: 2; justify-self: start; }
  .live-editor-toolbar { display: grid; }
  .live-persist { min-width: 0; padding-top: 12px; border-top: 1px solid var(--line-soft); }
  .live-exercise { grid-template-columns: 34px 34px minmax(0,1fr) 34px; gap: 7px; padding: 10px; }
  .live-exercise__handle { width: 34px; }
  .live-exercise__number { width: 34px; }
  .role-pick { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .stat-val { font-size: 28px; }
  .schedule-head { align-items: center; }
  .schedule-head .lead { display: none; }
  .schedule-head .display { font-size: clamp(34px, 11vw, 48px); }
  .schedule-head > .btn { width: 44px; height: 44px; padding: 0; overflow: hidden; font-size: 0; flex: none; }
  .schedule-head > .btn::before { content: '+'; font-size: 23px; }
  .schedule-controls { gap: 7px; }
  .schedule-range { font-size: 10.5px; }
  .schedule-week { gap: 3px; padding: 5px; border-radius: 19px; margin-inline: -3px; }
  .schedule-day { height: 72px; border-radius: 14px; }
  .schedule-day b { font-size: 18px; }
  .schedule-day i { height: 16px; min-width: 16px; font-size: 8px; }
  .schedule-agenda { padding: 15px; margin-inline: -3px; border-radius: 22px; }
  .schedule-card { grid-template-columns: 38px minmax(0,1fr) 16px; gap: 10px; }
  .schedule-card > .avatar { display: none; }
  .schedule-drag { width: 38px; height: 38px; }
  .schedule-card__line { gap: 5px; }
  .schedule-card__title { font-size: 15px; }
  .schedule-card__meta { white-space: normal; }
  .schedule-editor__grid { grid-template-columns: 1fr; }
  .schedule-editor__actions { align-items: stretch; flex-direction: column-reverse; }
  .schedule-editor__actions .btn { width: 100%; }
  .brief-schedule__item { grid-template-columns: 42px 32px minmax(0,1fr); }
  .brief-schedule__item .schedule-status { display: none; }
  .student-schedule__hero { grid-template-columns: 56px minmax(0,1fr); gap: 12px; padding: 14px; }
  .student-schedule__date { width: 56px; height: 56px; border-radius: 17px; }
  .student-schedule__go { grid-column: 2; }
  .student-schedule__row { grid-template-columns: 94px minmax(0,1fr); }
  .student-schedule__row small { grid-column: 2; }
}

@media (max-width: 720px) {
  .report-head { grid-template-columns: 40px minmax(0,1fr); gap: 10px; }
  .report-head .display { font-size: clamp(34px,10vw,46px); }
  .report-actions { grid-column: 2; }
  .report-actions .btn { flex: 1; }
  .report-week-nav { margin-inline: -2px; }
  .report-hero { padding: 18px; border-radius: 23px; }
  .report-person { grid-template-columns: 50px minmax(0,1fr); gap: 11px; }
  .report-person .avatar { width: 50px; height: 50px; }
  .report-person h2 { font-size: 25px; }
  .report-person > .report-status { grid-column: 2; justify-self: start; }
  .report-highlights { margin-top: 15px; }
  .report-metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .report-metric { padding: 14px; border-radius: 17px; }
  .report-metric__value { font-size: 27px; }
  .report-section { padding: 16px; border-radius: 20px; }
  .report-body-grid { grid-template-columns: 1fr 1fr; }
  .report-nutrition { grid-template-columns: 1fr; gap: 16px; }
  .report-publish-actions { flex-direction: column-reverse; }
  .report-publish-actions .btn { width: 100%; }
  .report-footer { display: grid; text-align: center; justify-content: center; }
}

@media (max-width: 390px) {
  .progress-actions .btn { padding-inline: 10px; }
  .student-report-button { padding-inline: 11px; }
  .report-workout { grid-template-columns: 34px minmax(0,1fr); }
  .report-workout__index { width: 34px; height: 34px; }
  .report-workout__volume { grid-column: 2; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; color: #111; }
  .topbar,.grain,.aura,.app-bottom-nav,.report-actions,.report-week-nav,.report-back,.report-publish-actions,.toast-stack { display: none; }
  .shell,.shell--narrow { max-width: none; padding: 0; }
  .report-head { grid-template-columns: 1fr; margin-bottom: 10mm; }
  .weekly-report { max-width: none; gap: 4mm; }
  .report-hero,.report-metric,.report-section { break-inside: avoid; box-shadow: none; }
  .report-section { padding: 5mm; }
  .report-photos { grid-auto-columns: 30mm; overflow: visible; }
  .report-photo { border-radius: 4mm; }
  .report-coach-note textarea { border: 0; background: transparent; padding: 0; resize: none; }
  .report-footer { margin-top: 5mm; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .aura i { animation: none; }
}
