/* Оформление мини-приложения.

   Тема всегда тёмная и не подстраивается под Telegram. Это осознанно:
   у продукта должен быть свой характер, а не вид системной панели.

   Вся палитра — в переменных ниже. Перекрасить приложение = поправить этот блок. */

:root {
  --bg: #0A0D12;            /* почти чёрный с синим подтоном */
  --surface: #141922;       /* карточка */
  --surface-2: #1C2430;     /* приподнятый элемент, поля ввода */
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .14);

  --text: #F2F5F9;
  --text-2: #8B94A5;        /* подписи и второстепенное */

  --accent: #38A3EA;        /* фирменный синий, осветлён для тёмного фона */
  --accent-deep: #0174C4;   /* исходный из логотипа — для заливок */
  --accent-soft: rgba(56, 163, 234, .13);
  --danger: #FF6B3D;
  --ok: #33C77F;

  --radius: 18px;
  --radius-sm: 13px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --glow: 0 8px 26px rgba(1, 116, 196, .35);
}

* { box-sizing: border-box; }

/* Атрибут hidden прячет элемент правилом display:none из настроек браузера,
   а любое наше .класс { display: flex } его перебивает. Без !important
   скрытые экраны остаются видимыми и закрывают собой приложение. */
[hidden] { display: none !important; }

button {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
button:focus:not(:focus-visible) { outline: none; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* ---------- Загрузка ---------- */

.boot {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--line-strong); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Шапка ---------- */

.topbar { padding: 20px 18px 10px; }
.topbar__brand { display: flex; align-items: center; gap: 9px; }
.topbar__logo { width: 26px; height: 26px; border-radius: 8px; display: block; flex-shrink: 0; }
.topbar__club {
  font-size: 12.5px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent);
}
.topbar__name { font-size: 29px; font-weight: 800; margin-top: 3px; line-height: 1.15; }

/* ---------- Экраны ---------- */

.views { padding: 6px 14px 100px; }
.view { display: none; }
.view.is-active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px;
  margin-bottom: 12px;
}
.card__title {
  font-size: 12px; font-weight: 700; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .09em; margin-bottom: 13px;
}
.card__count { font-weight: 700; color: var(--accent); text-transform: none; letter-spacing: 0; }

.hint { font-size: 13px; color: var(--text-2); margin-top: 10px; line-height: 1.5; }
.warn {
  font-size: 13px; line-height: 1.5; margin-top: 12px;
  background: rgba(255, 107, 61, .12); color: #FFB79B;
  border-radius: var(--radius-sm); padding: 11px 13px;
}
.notice { font-size: 13.5px; line-height: 1.55; color: var(--text-2); padding: 0 4px 14px; }

/* ---------- Фото-карточка ---------- */

.photo {
  position: relative; display: block; width: 100%;
  border: 0; padding: 0; text-align: left; font: inherit; cursor: pointer;
  border-radius: var(--radius); overflow: hidden;
  min-height: 172px; margin-bottom: 12px; color: var(--text);
  background: var(--surface);
}
.photo__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .9;
}
/* Фон не загрузился: высоту под него не держим, карточка сжимается
   по тексту. Как только фотография появится — вернётся прежний вид. */
.photo--noimg { min-height: 0; }
.photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(10, 13, 18, .97) 26%,
                            rgba(10, 13, 18, .80) 60%,
                            rgba(10, 13, 18, .42) 100%),
    linear-gradient(to top, rgba(10, 13, 18, .55), transparent 55%);
}
.photo__body { position: relative; z-index: 1; padding: 20px; }
.photo__label {
  font-size: 11.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
}
.photo__title { font-size: 26px; font-weight: 800; line-height: 1.15; margin: 7px 0 6px; }
.photo__meta { font-size: 13.5px; color: var(--text-2); }
.photo__btn {
  width: 100%; margin-top: 16px;
  background: var(--accent-deep); color: #fff;
  font-size: 15px; font-weight: 700;
  border: 0; border-radius: 12px; padding: 14px; cursor: pointer;
  box-shadow: var(--glow);
}
.photo__arrow {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  z-index: 1; font-size: 26px; color: var(--text-2);
}

/* ---------- Геройские блоки ---------- */

.card--hero {
  background: var(--surface);
  border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
/* Тонкая синяя полоса слева — фирменный акцент без крика. */
.card--hero::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
}
.hero__label {
  font-size: 11.5px; font-weight: 700; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .1em;
}
.hero__kcal { font-size: 44px; font-weight: 800; line-height: 1.05; margin: 7px 0 16px; }
.hero__kcal small { font-size: 15px; font-weight: 650; color: var(--text-2); margin-left: 7px; }

.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.macro {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 8px; text-align: center;
}
.macro b { display: block; font-size: 19px; font-weight: 750; color: var(--accent); }
.macro span { font-size: 10.5px; color: var(--text-2); }

/* ---------- Ранг ---------- */

.rank__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rank__label {
  font-size: 11.5px; font-weight: 700; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .09em;
}
.rank__title { font-size: 23px; font-weight: 800; line-height: 1.2; margin-top: 3px; }
.rank__xp { text-align: right; flex-shrink: 0; }
.rank__xp b { display: block; font-size: 23px; font-weight: 800; color: var(--accent); }
.rank__xp span { font-size: 11px; color: var(--text-2); }
.rank__bar {
  height: 9px; border-radius: 999px; background: var(--surface-2);
  overflow: hidden; margin-top: 15px;
}
.rank__fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  transition: width .6s ease;
}
.rank__note { font-size: 12.5px; color: var(--text-2); margin-top: 10px; }

/* ---------- Плитки ---------- */

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 12px; }
.tile {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 8px; text-align: center;
}
.tile b { display: block; font-size: 22px; font-weight: 800; line-height: 1.15; }
.tile span { font-size: 10.5px; color: var(--text-2); }
.tile.is-accent b { color: var(--accent); }

/* ---------- Кнопки ---------- */

.btn {
  width: 100%; border: 0; cursor: pointer; font: inherit;
  background: var(--accent-deep); color: #fff;
  font-size: 15px; font-weight: 700;
  border-radius: 13px; padding: 14px; margin-top: 12px;
  box-shadow: var(--glow);
}
.btn:active { opacity: .88; }
.btn[disabled] { background: var(--surface-2); color: var(--text-2); box-shadow: none; cursor: default; }
.btn--ghost {
  background: transparent; color: var(--accent);
  border: 1px solid var(--line-strong); box-shadow: none;
}
.btn--danger {
  background: transparent; color: var(--danger);
  border: 1px solid rgba(255, 107, 61, .4); box-shadow: none;
}

/* ---------- Строки-папки ---------- */

.folders {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 12px;
}
.folder {
  width: 100%; border: 0; text-align: left; font: inherit; cursor: pointer;
  background: none; color: var(--text);
  padding: 16px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 13px;
}
.folder:first-child { border-top: 0; }
.folder:active { background: var(--surface-2); }
.folder__body { flex: 1; min-width: 0; }
.folder__name { display: block; font-size: 15.5px; font-weight: 650; }
.folder__note {
  display: block; font-size: 12.5px; color: var(--text-2); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.folder__arrow { color: var(--text-2); font-size: 19px; }

.list .row, .rows .row, .rows-wrap .row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 10px 0; font-size: 14.5px;
}
.list .row + .row, .rows .row + .row, .rows-wrap .row + .row { border-top: 1px solid var(--line); }
.rows .row span:first-child, .list .row span:first-child { color: var(--text-2); }
.rows .row span:last-child { text-align: right; font-weight: 650; }

/* ---------- Каталог упражнений ---------- */

.group { margin-bottom: 10px; }
.group__head {
  width: 100%; border: 1px solid var(--line); font: inherit; cursor: pointer; text-align: left;
  background: var(--surface); border-radius: var(--radius);
  padding: 16px; color: var(--text);
  display: flex; align-items: center; justify-content: space-between;
}
.group__head b { font-size: 15.5px; font-weight: 700; }
.group__count { font-size: 12.5px; color: var(--text-2); }
.group__items { display: none; padding: 6px 0 2px; }
.group.is-open .group__items { display: block; }
.group.is-open .group__head { border-radius: var(--radius) var(--radius) 0 0; border-bottom: 0; }

.item {
  width: 100%; border: 1px solid var(--line); border-top: 0; font: inherit;
  cursor: pointer; text-align: left;
  background: var(--surface); color: var(--text); padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.item:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.item__name { font-size: 14.5px; }
.item__meta { font-size: 11.5px; color: var(--text-2); flex-shrink: 0; }

/* ---------- Переключатель периода ---------- */

.seg {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 4px; margin-bottom: 12px;
}
.seg__btn {
  border: 0; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 650;
  background: none; color: var(--text-2); border-radius: 10px; padding: 10px 4px;
}
.seg__btn.is-on { background: var(--accent-deep); color: #fff; }

/* ---------- График веса ---------- */

.chart svg { width: 100%; height: auto; display: block; }
.chart__legend {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text-2); margin-top: 10px;
}

/* ---------- Столбики тренировок ---------- */

.bars { display: flex; align-items: flex-end; gap: 6px; height: 112px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.bar__col { width: 100%; flex: 1; display: flex; align-items: flex-end; }
.bar__fill { width: 100%; border-radius: 7px 7px 4px 4px; background: var(--accent-soft); min-height: 4px; }
.bar.is-now .bar__fill { background: linear-gradient(180deg, var(--accent), var(--accent-deep)); }
.bar__n { font-size: 12px; font-weight: 700; color: var(--text-2); }
.bar.is-now .bar__n { color: var(--accent); }
.bar__d { font-size: 9.5px; color: var(--text-2); }

/* ---------- Рост силы ---------- */

.str { padding: 12px 0; border-top: 1px solid var(--line); }
.str:first-child { border-top: 0; padding-top: 0; }
.str__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.str__name { font-size: 14.5px; font-weight: 650; }
.str__delta { font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.str__delta.is-zero { color: var(--text-2); }
.str__line { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.str__from, .str__to { font-size: 12.5px; color: var(--text-2); }
.str__track { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.str__grow { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); }

/* ---------- Нагрузка по группам ---------- */

.mus { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.mus__name { font-size: 13.5px; width: 92px; flex-shrink: 0; }
.mus__track { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.mus__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); }
.mus__pct { font-size: 12px; color: var(--text-2); width: 34px; text-align: right; flex-shrink: 0; }

/* ---------- Карточка тренировки со сводкой ---------- */

.wcard {
  width: 100%; text-align: left; font: inherit; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 17px; margin-bottom: 12px; color: var(--text);
  display: flex; align-items: center; gap: 15px;
}
.wcard--flat { cursor: default; }
.wcard__ring {
  width: 60px; height: 60px; flex-shrink: 0; border-radius: 50%;
  border: 3px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: var(--accent);
}
.wcard__body { flex: 1; min-width: 0; }
.wcard__label {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
}
.wcard__title { font-size: 21px; font-weight: 800; line-height: 1.2; margin: 4px 0 5px; }
.wcard__meta { font-size: 12.5px; color: var(--text-2); }
.wcard__arrow { font-size: 22px; color: var(--text-2); flex-shrink: 0; }

/* ---------- Строка упражнения в списке ---------- */

.exrow {
  width: 100%; border: 1px solid var(--line); text-align: left; font: inherit; cursor: pointer;
  background: var(--surface); color: var(--text);
  border-radius: var(--radius-sm); padding: 14px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px;
}
.exrow:active { background: var(--surface-2); }
.exrow__body { flex: 1; min-width: 0; }
.exrow__name { font-size: 15px; font-weight: 650; line-height: 1.3; }
.exrow__plan { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.exrow__pct { font-size: 13px; font-weight: 700; color: var(--text-2); flex-shrink: 0; }
.exrow__pct.is-part { color: var(--danger); }
.exrow__pct.is-full { color: var(--ok); }
.exrow__arrow { color: var(--text-2); font-size: 18px; flex-shrink: 0; }

/* ---------- Упражнение внутри карточки ---------- */

.exline { padding: 14px 0; border-top: 1px solid var(--line); }
.exline:first-child { border-top: 0; padding-top: 0; }
.exline__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.exline__name {
  border: 0; background: none; padding: 0; font: inherit; text-align: left;
  color: var(--text); font-size: 15.5px; font-weight: 650; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}
.exline__scheme { font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; flex-shrink: 0; }
.exline__sub { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.exline__weight { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.exline__weight input {
  width: 96px; font: inherit; font-size: 15px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
}
.exline__weight input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.exline__weight span { font-size: 12.5px; color: var(--text-2); }

/* ---------- День отдыха и отметка ---------- */

.rest__emoji { font-size: 34px; }
.rest__title { font-size: 21px; font-weight: 750; margin: 10px 0 7px; }
.rest__text { font-size: 14.5px; line-height: 1.55; color: var(--text-2); margin: 0; }

.done-badge {
  background: rgba(51, 199, 127, .12); color: var(--ok);
  border: 1px solid rgba(51, 199, 127, .3);
  border-radius: var(--radius-sm); padding: 15px; text-align: center;
  font-size: 15px; font-weight: 700; margin-top: 14px;
}

/* ---------- Календарь ---------- */

.cal__head, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal__head { margin-bottom: 7px; }
.cal__head span {
  text-align: center; font-size: 10.5px; font-weight: 700;
  color: var(--text-2); text-transform: uppercase;
}
.cal__day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 11px; font-size: 13px; color: var(--text-2);
}
button.cal__day { border: 0; font: inherit; cursor: pointer; padding: 0; }
.cal__day.is-empty { visibility: hidden; }
.cal__day.is-planned { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.cal__day.is-done {
  background: linear-gradient(150deg, var(--accent-deep), var(--accent));
  color: #fff; font-weight: 750;
}
.cal__day.is-today { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal__month { font-size: 14px; font-weight: 700; margin-bottom: 12px; text-align: center; }
.cal__legend {
  display: flex; gap: 16px; justify-content: center; margin-top: 14px;
  font-size: 11.5px; color: var(--text-2);
}
.cal__sw {
  width: 10px; height: 10px; border-radius: 3px; display: inline-block;
  margin-right: 5px; vertical-align: -1px;
}
.cal__sw--done { background: var(--accent); }
.cal__sw--planned { background: var(--accent-soft); }

/* ---------- Выбор тренировки ---------- */

.choices { display: grid; gap: 10px; margin-top: 16px; }
.choice {
  width: 100%; border: 1px solid var(--line); text-align: left; font: inherit; cursor: pointer;
  background: var(--surface); color: var(--text);
  border-radius: var(--radius); padding: 16px;
}
.choice b { display: block; font-size: 16px; font-weight: 700; }
.choice span { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.choice--alt { background: var(--accent-soft); border-color: rgba(56, 163, 234, .3); }
.choice--alt b { color: var(--accent); }

/* ---------- Конструктор своей тренировки ---------- */

.picker { margin-top: 16px; padding-bottom: 86px; }
.pick__group { margin-bottom: 18px; }
.pick__head {
  font-size: 12px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: .09em; margin-bottom: 8px;
}
.pick {
  display: flex; align-items: center; gap: 11px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 6px; cursor: pointer;
}
.pick input { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; }
.pick__name { font-size: 14.5px; flex: 1; }
.pick__meta { font-size: 11.5px; color: var(--text-2); text-align: right; flex-shrink: 0; max-width: 40%; }
.picker__bar {
  position: sticky; bottom: 0; padding: 10px 0 4px;
  background: linear-gradient(to top, var(--bg) 72%, transparent);
}
.picker__bar .btn { margin-top: 0; }

/* ---------- История ---------- */

.hist {
  width: 100%; border: 0; font: inherit; cursor: pointer; text-align: left;
  background: none; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 0; border-top: 1px solid var(--line);
}
.hist:first-child { border-top: 0; padding-top: 0; }
.hist__left b { display: block; font-size: 15px; font-weight: 650; }
.hist__left span { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.hist__top { font-size: 12.5px; font-weight: 700; color: var(--accent); white-space: nowrap; flex-shrink: 0; }

/* ---------- Значки ---------- */

.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px; }
.badge { text-align: center; }
.badge__art {
  width: 56px; height: 56px; margin: 0 auto 8px;
  border-radius: 17px; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--text-2);
  border: 1.5px dashed var(--line-strong);
}
.badge__art svg {
  width: 27px; height: 27px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.badge.is-earned .badge__art {
  background: linear-gradient(150deg, var(--accent-deep), var(--accent));
  color: #fff; border: 0; box-shadow: var(--glow);
}
.badge__title { font-size: 12px; font-weight: 700; line-height: 1.25; }
.badge__hint { font-size: 10.5px; color: var(--text-2); line-height: 1.3; margin-top: 3px; }
.badge:not(.is-earned) .badge__title { color: var(--text-2); }

/* ---------- Награда после тренировки ---------- */

.reward {
  background: linear-gradient(135deg, #0A4E86, #1E96DE);
  border: 0; color: #fff; text-align: center; box-shadow: var(--glow);
}
.reward__xp { font-size: 30px; font-weight: 800; }
.reward__label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  opacity: .85; margin-top: 15px;
}
.reward__list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 11px; }
.reward__badge {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, .18); border-radius: 999px; padding: 8px 14px;
}
.reward__badge svg {
  width: 18px; height: 18px; fill: none; stroke: #fff;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.reward__badge span { font-size: 12.5px; font-weight: 700; }

/* ---------- Нижние вкладки ---------- */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  /* Колонки по числу кнопок — вкладку можно убрать или добавить без правки стилей. */
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(10, 13, 18, .92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  border: 0; background: none; font: inherit; cursor: pointer;
  color: var(--text-2); padding: 10px 2px 9px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.tab svg {
  width: 23px; height: 23px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.tab span { font-size: 10.5px; font-weight: 650; }
.tab.is-active { color: var(--accent); }

/* ---------- Быстрые кнопки ---------- */

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.quick__btn {
  border: 1px solid var(--line); cursor: pointer; font: inherit; color: var(--text);
  background: var(--surface); border-radius: var(--radius); padding: 19px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
}
.quick__btn svg {
  width: 26px; height: 26px; fill: none; stroke: var(--accent);
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.quick__btn span { font-size: 13px; font-weight: 650; }

/* ---------- Экран-папка ---------- */

.page {
  position: fixed; inset: 0; z-index: 25;
  background: var(--bg); color: var(--text);
  display: flex; flex-direction: column;
  animation: slideIn .22s ease;
}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } }
.page__bar {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 14px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.page__back {
  width: 38px; height: 38px; flex-shrink: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--surface-2); color: var(--text); font-size: 17px;
}
.page__title { font-size: 16.5px; font-weight: 750; }
.page__body { flex: 1; overflow-y: auto; padding: 15px 14px; }
.page__foot {
  padding: 11px 14px calc(13px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--surface);
}
.page__foot .btn { margin-top: 0; }
.page__foot .btn + .btn { margin-top: 8px; }

/* ---------- Полноэкранная карточка ---------- */

.sheet {
  position: fixed; inset: 0; z-index: 20;
  background: var(--bg); overflow-y: auto;
  animation: rise .24s ease;
}
@keyframes rise { from { transform: translateY(18px); opacity: 0; } }
.sheet__inner { padding: 18px 14px 44px; max-width: 640px; margin: 0 auto; }
.sheet__close {
  position: sticky; top: 0; margin-left: auto; display: block;
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--text);
  font-size: 15px; cursor: pointer;
}
.ex__name { font-size: 25px; font-weight: 800; line-height: 1.2; margin: 8px 0 5px; }
.ex__meta { font-size: 13px; color: var(--accent); font-weight: 650; margin-bottom: 16px; }
.ex__block { margin-top: 20px; }
.ex__block h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-2); margin: 0 0 9px;
}
.ex__block p { margin: 0; font-size: 15px; line-height: 1.6; }
.ex__mistakes { margin: 0; padding-left: 18px; font-size: 15px; line-height: 1.65; }
.ex video { width: 100%; border-radius: var(--radius); background: #000; display: block; }
.ex__novideo {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 16px;
  text-align: center; font-size: 13px; color: var(--text-2);
}

/* ---------- Пошаговый режим тренировки ---------- */

.player {
  position: fixed; inset: 0; z-index: 30;
  background: var(--bg); color: var(--text);
  display: flex; flex-direction: column;
  animation: slideIn .22s ease;
}
.player__bar {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.player__icon {
  width: 38px; height: 38px; flex-shrink: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--surface-2); color: var(--text); font-size: 15px;
}
.player__pos { flex: 1; text-align: center; font-size: 15px; font-weight: 750; }
.player__finish {
  border: 0; cursor: pointer; font: inherit; flex-shrink: 0;
  background: var(--accent-deep); color: #fff;
  font-size: 13.5px; font-weight: 700;
  border-radius: 999px; padding: 10px 16px; box-shadow: var(--glow);
}
.player__body { flex: 1; overflow-y: auto; padding: 16px 14px 8px; }
.player__nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 11px 14px calc(13px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--surface);
}
.player__nav-btn {
  border: 0; cursor: pointer; font: inherit; font-size: 15px; font-weight: 700;
  border-radius: 13px; padding: 14px;
  background: var(--surface-2); color: var(--text);
}
.player__nav-btn--main { background: var(--accent-deep); color: #fff; box-shadow: var(--glow); }
.player__nav-btn[disabled] { opacity: .35; cursor: default; }

.pl__media { border-radius: var(--radius); overflow: hidden; background: #000; }
.pl__media video { width: 100%; display: block; }
.pl__novideo {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px 16px;
  text-align: center; font-size: 13px; color: var(--text-2);
}
.pl__name { font-size: 24px; font-weight: 800; line-height: 1.2; margin: 18px 0 5px; }
.pl__meta { font-size: 13px; color: var(--accent); font-weight: 650; }
.pl__hint { font-size: 13.5px; color: var(--text-2); margin-top: 9px; line-height: 1.5; }

.circles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0; }
.circle { text-align: center; }
button.circle { border: 0; background: none; font: inherit; cursor: pointer; padding: 0; }
.circle__ring {
  width: 86px; height: 86px; margin: 0 auto 8px;
  border-radius: 50%; border: 2.5px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 800;
}
.circle--plan .circle__ring { border-color: var(--accent); color: var(--accent); }
.circle--rest .circle__ring { border-color: var(--danger); color: var(--danger); }
.circle--rest.is-idle .circle__ring { border-color: var(--line-strong); color: var(--text-2); }
.circle--done .circle__ring { border-color: var(--accent); }
.circle--done.is-full .circle__ring {
  background: linear-gradient(150deg, var(--accent-deep), var(--accent));
  color: #fff; border-color: transparent; box-shadow: var(--glow);
}
.circle span { font-size: 11px; color: var(--text-2); line-height: 1.3; display: block; }

.entry { display: grid; grid-template-columns: 1fr 1fr 58px; gap: 8px; }
.entry input {
  font: inherit; font-size: 15px; text-align: center;
  padding: 14px 8px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
}
.entry input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.entry button {
  border: 0; cursor: pointer; background: var(--accent-deep); color: #fff;
  font-size: 26px; font-weight: 400; border-radius: var(--radius-sm);
  box-shadow: var(--glow);
}

.setlist { margin-top: 16px; }
.setrow {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 6px;
}
.setrow__no {
  width: 25px; height: 25px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 750;
}
.setrow b { font-size: 15px; font-weight: 700; }
.setlist__undo {
  border: 0; background: none; cursor: pointer; font: inherit;
  color: var(--text-2); font-size: 13px; padding: 10px 0; text-decoration: underline;
}

/* ---------- Пустые состояния ---------- */

.empty {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 38px 24px; text-align: center;
}
.empty__icon { font-size: 36px; }
.empty__title { font-size: 18px; font-weight: 750; margin: 12px 0 7px; }
.empty__text { font-size: 13.5px; color: var(--text-2); line-height: 1.55; }

/* ---------- Знакомство ---------- */

.tour__lead { font-size: 14.5px; color: var(--text-2); line-height: 1.55; margin: 2px 4px 16px; }
.tour__item { display: flex; gap: 15px; align-items: flex-start; }
.tour__icon { font-size: 27px; flex-shrink: 0; line-height: 1.2; }
.tour__title { font-size: 16.5px; font-weight: 750; }
.tour__text { font-size: 13.5px; color: var(--text-2); line-height: 1.55; margin-top: 5px; }

/* ---------- Сообщения ---------- */

.toast {
  position: fixed; left: 14px; right: 14px; bottom: 88px; z-index: 60;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 14px 16px;
  font-size: 14px; line-height: 1.45; text-align: center;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: var(--shadow);
}
.toast.is-on { opacity: 1; transform: translateY(0); }
.toast--bad { background: #3A1A10; border-color: rgba(255, 107, 61, .45); color: #FFB79B; }

/* ---------- Ошибка ---------- */

.error {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  padding: 34px; text-align: center; font-size: 15.5px; line-height: 1.6;
  background: var(--bg); color: var(--text);
}
