/* ==========================================================================
   Умскул — mini app: дизайн-система
   ========================================================================== */

:root {
  /* Бренд Умскул: оранжевый, чёрный, белый.
     --brand — фирменный #FF6B00 там, где на нём нет текста: полоса прогресса,
     ползунок, рамки выбранного. Белый текст на нём — 2,9:1, нечитаемо,
     поэтому кнопки и плашки с текстом — --brand-strong (4,8:1), а оранжевый
     текст и числа на светлом — --brand-ink (5:1 и выше). WCAG AA: 4,5:1. */
  --brand: #FF6B00;
  --brand-600: #EA5F00;
  --brand-700: #C24E00;
  --brand-strong: #C24E00;
  --brand-ink: #B34700;
  --brand-soft: #FFF1E6;
  --brand-soft-2: #FFD9BE;
  --accent: #14110F;
  --accent-ink: #FFFFFF;

  /* Нейтральные. --muted — 5,3:1 на белом (было 4,2:1) */
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F7F4F2;
  --ink: #14110F;
  --ink-2: #3D3835;
  --muted: #736A64;
  --line: #EDE7E2;

  /* Неактивная кнопка: серая с тёмной подписью (4,6:1), а не бледная */
  --disabled-bg: #EDE7E2;
  --disabled-ink: #6F6660;

  --danger-ink: #B42318;
  --danger-soft: #FEF3F2;

  --danger: #FF5C5C;
  --success: #22B07D;

  /* Метрики */
  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 14px;
  --pad: 20px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --shadow-1: 0 2px 10px rgba(20, 17, 15, .07);
  --shadow-2: 0 10px 28px rgba(255, 107, 0, .22);

  --ease: cubic-bezier(.22, .8, .28, 1);
}

/* Тёмная тема: системная + принудительная от Telegram */
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) {
    --bg: #121110;
    --surface: #1D1B19;
    --surface-2: #191716;
    --ink: #FBF7F4;
    --ink-2: #D9D2CC;
    --muted: #9C938C;
    --line: #322D29;
    --brand-soft: #2A1F16;
    --brand-soft-2: #4A3320;
    --brand-ink: #FF8A3D;
    --accent: #FBF7F4;
    --accent-ink: #14110F;
    --disabled-bg: #322D29;
    --disabled-ink: #A39A93;
    --danger-ink: #FDA29B;
    --danger-soft: #3A1715;
    --shadow-1: 0 2px 10px rgba(0, 0, 0, .3);
    --shadow-2: 0 10px 30px rgba(0, 0, 0, .45);
  }
}
:root[data-scheme="dark"] {
  --bg: #121110;
  --surface: #1D1B19;
  --surface-2: #191716;
  --ink: #FBF7F4;
  --ink-2: #D9D2CC;
  --muted: #9C938C;
  --line: #322D29;
  --brand-soft: #2A1F16;
  --brand-soft-2: #4A3320;
  --brand-ink: #FF8A3D;
  --accent: #FBF7F4;
  --accent-ink: #14110F;
  --disabled-bg: #322D29;
  --disabled-ink: #A39A93;
  --danger-ink: #FDA29B;
  --danger-soft: #3A1715;
  --shadow-1: 0 2px 10px rgba(0, 0, 0, .3);
  --shadow-2: 0 10px 30px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  overscroll-behavior-y: none;
}

button, input { font: inherit; color: inherit; }

.app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  padding-top: var(--safe-top);
}

/* ---------------------------------------------------------------- topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px var(--pad) 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
}

.icon-btn {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:active { transform: scale(.9); background: var(--brand-soft); }
.icon-btn[hidden] { display: none; }

/* Название раздела в полосе: проявляется, когда большой заголовок уехал под неё */
.topbar__title {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.topbar__title:empty { display: none; }
.topbar--titled { box-shadow: 0 1px 0 var(--line); }
.topbar--titled .topbar__title { opacity: 1; transform: none; }

/* «Назад» штатная, в шапке Telegram: полоса лежит поверх экрана и места
   не занимает, пока большой заголовок виден */
.topbar--float {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 12px) var(--pad) 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s var(--ease);
}
.topbar--float.topbar--titled { opacity: 1; }
body.bar-float .screen { padding-top: 20px; }

/* Жест «назад»: стрелка выезжает из-за левого края, пока тянут вправо,
   и заливается цветом, когда отпускание уже вернёт назад */
.swipe-back {
  position: fixed;
  top: 50%;
  left: 0;
  z-index: 60;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1), 0 0 0 1px var(--line);
  opacity: 0;
  transform: translate3d(-52px, -50%, 0) scale(.7);
  pointer-events: none;
  transition: transform .22s var(--ease), opacity .22s var(--ease), background .15s, color .15s;
}
.swipe-back svg { width: 22px; height: 22px; }
.swipe-back--ready { background: var(--brand-strong); color: var(--accent-ink); box-shadow: var(--shadow-2); }
.screen { transition: transform .22s var(--ease); }
/* пока палец на экране — без запаздывания, ровно за ним */
body.swiping .screen { transition: none; }
body.swiping .swipe-back { transition: background .15s, color .15s; }

/* -------------------------------------------------------------- progress */

.progress { flex: 1; min-width: 0; }
.progress[hidden] { display: none; }

.progress__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.progress__label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.progress__pct {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
}

.progress__track {
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: var(--brand-soft);
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand) 0%, #FF9A4D 100%);
  transition: width .55s var(--ease);
  position: relative;
}
.progress__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .55) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: shimmer 2.4s var(--ease) infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

.progress__dots { display: flex; gap: 5px; margin-top: 7px; }
.progress__dot {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: var(--line);
  transition: background .4s var(--ease), transform .4s var(--ease);
}
.progress__dot--done { background: var(--brand); }
.progress__dot--current { background: var(--accent); transform: scaleY(1.8); }

/* ---------------------------------------------------------------- screen */

.screen {
  position: relative;
  flex: 1;
  /* нижний отступ = высота липкой кнопки, чтобы контент не уезжал под неё */
  padding: 6px var(--pad) 112px;
}
/* в Telegram кнопку рисует сам клиент — липкий футер не нужен */
body.native-cta .screen { padding-bottom: 28px; }

/* Одновременно на экране всегда один шаг: предыдущий удаляется сразу,
   поэтому анимация нужна только на появление. */
.step { will-change: transform, opacity; }

@keyframes enterRight { from { opacity: 0; transform: translate3d(28px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes enterLeft  { from { opacity: 0; transform: translate3d(-28px, 0, 0); } to { opacity: 1; transform: none; } }
.step--enter-fwd  { animation: enterRight .34s var(--ease) both; }
.step--enter-back { animation: enterLeft  .34s var(--ease) both; }

/* Заголовки шага */
.step__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 99px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}
.step__title {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -.03em;
  font-weight: 800;
}
.step__subtitle {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15px;
}

/* Появление элементов списка каскадом */
.stagger > * {
  animation: pop .4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms + 60ms);
}
@keyframes pop { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------------------- cards */

.options { display: grid; gap: 10px; }

.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s var(--ease), transform .16s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.option:active { transform: scale(.98); }
.option--selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: var(--shadow-2);
}

.option__emoji {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 22px;
  border-radius: 14px;
  background: var(--surface-2);
  transition: transform .3s var(--ease), background .2s var(--ease);
}
.option--selected .option__emoji { background: var(--surface); transform: rotate(-6deg) scale(1.06); }

.option__body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.option__title { font-weight: 700; letter-spacing: -.01em; }
.option__desc { font-size: 13px; color: var(--muted); line-height: 1.3; }
.option__title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.option__badge {
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--brand-strong);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.option--track { padding: 18px 16px; align-items: flex-start; }
.option--track .option__emoji { margin-top: 2px; }
.option--track .option__check { margin-top: 10px; }
.option--track .option__emoji { background: var(--brand-soft); }

.option__check {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.option__check svg { width: 14px; height: 14px; color: #fff; }
.option__check path { stroke-dasharray: 20; stroke-dashoffset: 20; }
.option--selected .option__check {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  transform: scale(1.08);
}
.option--selected .option__check path { animation: draw .3s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Сетка классов */
.grid-grades {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.grade {
  position: relative;
  padding: 16px 8px 13px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  transition: border-color .2s var(--ease), transform .16s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.grade:active { transform: scale(.95); }
.grade__num {
  display: block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
}
.grade__cls { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.grade__tag {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  background: var(--surface-2);
  color: var(--muted);
}
.grade--exam .grade__tag { background: var(--accent); color: var(--accent-ink); }
.grade--selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: var(--shadow-2);
}
.grade--selected .grade__num { color: var(--brand-ink); }

/* Чипы предметов */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 15px;
  border: 2px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s var(--ease), transform .16s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.chip:active { transform: scale(.94); }
.chip--selected {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
  color: #fff;
  box-shadow: var(--shadow-2);
  animation: chipPop .32s var(--ease);
}
@keyframes chipPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.09); }
  100% { transform: scale(1); }
}
.chip__x { font-size: 12px; opacity: .8; }

.counter {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-ink);
  min-height: 18px;
}

/* --------------------------------------------------------------- цели */

.goal-card {
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 10px;
  transition: border-color .2s var(--ease);
}
.goal-card--touched { border-color: var(--brand-soft-2); }

.goal-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.goal-card__name { font-weight: 700; flex: 1; min-width: 0; }
.goal-card__value {
  font-weight: 800;
  font-size: 20px;
  color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
  transition: transform .18s var(--ease);
}
.goal-card__value--bump { transform: scale(1.18); }
.goal-card__unit { font-size: 12px; font-weight: 700; color: var(--muted); }

/* Слайдер */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand) var(--p, 80%), var(--brand-soft) var(--p, 80%));
  outline: none;
  margin: 0;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
  box-shadow: var(--shadow-2);
  cursor: grab;
  transition: transform .15s var(--ease);
}
.slider:active::-webkit-slider-thumb { transform: scale(1.15); }
.slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
  box-shadow: var(--shadow-2);
  cursor: grab;
}
.slider::-moz-range-track { height: 10px; border-radius: 99px; background: transparent; }

.presets { display: flex; gap: 7px; margin-top: 12px; }
.preset {
  flex: 1;
  padding: 8px 4px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.preset:active { transform: scale(.94); }
.preset--active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }

/* Оценки (ОГЭ / школа) */
.marks { display: flex; gap: 8px; }
.mark {
  flex: 1;
  padding: 12px 0;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  transition: all .18s var(--ease);
}
.mark:active { transform: scale(.94); }
.mark--active {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
  color: #fff;
  box-shadow: var(--shadow-2);
}

/* --------------------------------------------------------------- меню */

.menu__logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  display: block;
}

.option__arrow {
  flex: none;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  transition: transform .18s var(--ease);
}
.option:active .option__arrow { transform: translateX(3px); }
.option--muted { border-style: dashed; }
.option--muted .option__emoji { background: transparent; }

/* Блоки контента раздела */

.block-text {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
}

.block-list { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 9px; }
.block-list__item {
  position: relative;
  padding-left: 26px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.45;
}
.block-list__item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.block-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.stat {
  padding: 16px 12px;
  border-radius: var(--radius);
  background: var(--brand-soft);
  text-align: center;
}
.stat__value {
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: -.03em;
  color: var(--brand-ink);
}
.stat__label { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.3; }
/* Короткие числа (оценки площадок) — все в одну строку */
.block-stats--compact { grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; }
.block-stats--compact .stat { padding: 12px 6px; }
.block-stats--compact .stat__value { font-size: 20px; }

.block-quote {
  margin: 0 0 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border-left: 3px solid var(--brand);
}
.block-quote__text { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.block-quote__author { margin-top: 10px; font-size: 13px; color: var(--muted); }

.block-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  margin-bottom: 10px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color .2s var(--ease), transform .16s var(--ease);
}
.block-link:active { transform: scale(.98); border-color: var(--brand); }
.block-link__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.block-link__text { font-weight: 700; font-size: 15px; }
.block-link__desc { font-size: 13px; color: var(--muted); }

/* Заготовка в контенте меню: место под настоящий текст заказчика.
   Пунктир — чтобы забытую заготовку было видно на проверке. */
.block-draft {
  display: block;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 2px dashed var(--brand-soft-2);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.45;
}
.block-draft__label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brand-ink);
}

/* Подзаголовок внутри раздела и выделенный факт */
.block-heading {
  margin: 26px 0 10px;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 800;
}
.block-callout {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.4;
}
.block-sub {
  margin: 18px 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.block-sub:first-child { margin-top: 4px; }

/* Подпись над строками («по месяцу, когда начали») */
.block-figure { margin: 0 0 14px; }
.block-figure .block-rows { margin-bottom: 0; }
.block-figure__caption { margin: 0 0 8px; font-size: 13px; color: var(--muted); line-height: 1.4; }

/* Таблица «за год / за всё время» */
.block-compare {
  width: 100%;
  margin: 0 0 14px;
  border-collapse: separate;
  border-spacing: 0;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 15px;
}
.block-compare th, .block-compare td { padding: 11px 12px; text-align: right; }
.block-compare thead th {
  padding-top: 9px;
  padding-bottom: 7px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
}
.block-compare tbody th { text-align: left; font-weight: 600; color: var(--ink-2); }
.block-compare tbody td {
  font-weight: 800;
  color: var(--brand-ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.block-compare tbody tr + tr > * { border-top: 1px solid var(--line); }

/* Одно главное число крупно */
.block-highlight {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 10px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--brand-soft);
}
.block-highlight__value {
  flex: none;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
}
.block-highlight__title { font-size: 15px; font-weight: 800; }
.block-highlight__text { margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }

/* Строки «подпись — число» */
.block-rows {
  margin: 0 0 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.block-rows__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  font-size: 15px;
}
.block-rows__row + .block-rows__row { border-top: 1px solid var(--line); }
.block-rows__label { color: var(--ink-2); }
.block-rows__value {
  flex: none;
  font-weight: 800;
  color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
}

/* Нумерованная инструкция */
.block-steps { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 10px; }
.block-steps__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.45;
}
.block-steps__num {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 800;
}
.block-steps__text { padding-top: 2px; }

/* Картинки: по нажатию — во весь экран */
.block-image {
  margin: 0 0 14px;
  cursor: zoom-in;
}
.block-image__img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.block-image__caption {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}
.block-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.block-image--tile { margin: 0; }
.block-image--tile .block-image__img { aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }

/* Раскрывающийся пункт */
.block-details {
  margin: 0 0 10px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.block-details__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
}
.block-details__summary::-webkit-details-marker { display: none; }
.block-details__title { flex: 1; min-width: 0; }
.block-details__chevron {
  flex: none;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  transition: transform .2s var(--ease);
}
.block-details[open] .block-details__chevron { transform: rotate(90deg); }
.block-details__body { padding: 0 16px 6px; }
.block-details__body > .block-image .block-image__img { border-radius: var(--radius-sm); }
/* «Другие предметы» в курсах: внутри — такие же карточки, рамка лишняя */
.block-details--plain { border: 0; background: transparent; overflow: visible; }
.block-details--plain > .block-details__summary {
  padding: 14px 16px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
}
.block-details--plain[open] > .block-details__summary { margin-bottom: 10px; }
.block-details--plain > .block-details__body { padding: 0; }

/* Вкладки класса у курсов и расписаний */
.block-wide { margin-bottom: 14px; }
.block-tabs__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 calc(var(--pad) * -1) 14px;
  padding: 0 var(--pad) 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.block-tabs__bar::-webkit-scrollbar { display: none; }
.block-tabs__lead {
  flex: none;
  margin-right: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.block-tabs__tab {
  flex: none;
  padding: 9px 14px;
  border: 2px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.block-tabs__tab--short { min-width: 46px; text-align: center; }
.block-tabs__tab--active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

/* Строка-кнопка поплотнее — в длинных списках (расписания) */
.option--compact { padding: 11px 14px; gap: 12px; }
.option--compact .option__emoji { width: 36px; height: 36px; font-size: 18px; }

/* Карточка бесплатного курса */
.course {
  margin-bottom: 10px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.course__subject {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.course__title {
  margin: 6px 0 2px;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -.01em;
  font-weight: 800;
}
.course__teacher { font-size: 13px; color: var(--brand-ink); font-weight: 700; }
.course__text {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.45;
}
.course__coupon {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 8px 8px 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
}
.course__coupon-label {
  flex: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.course__code {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  -webkit-user-select: all;
  user-select: all;
}
.course__copy {
  flex: none;
  padding: 9px 13px;
  border: 0;
  border-radius: 11px;
  background: var(--brand-strong);
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s var(--ease);
}
.course__copy:active { transform: scale(.94); }
/* «Отправить ребёнку» — у родителя, под кодом */
.course__share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 11px 14px;
  border: 2px solid var(--brand-soft-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--brand-ink);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s var(--ease), background .16s var(--ease);
}
.course__share svg { width: 17px; height: 17px; }
.course__share:active { transform: scale(.97); background: var(--brand-soft); }
.course__copy--done { background: var(--success); }

/* Отзыв с результатом */
.reviews { display: grid; gap: 10px; }
.review {
  margin: 0;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.review__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.review__who { min-width: 0; }
.review__name { font-weight: 800; font-size: 15px; }
.review__meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.review__badge {
  flex: none;
  max-width: 48%;
  padding: 5px 10px;
  border-radius: 99px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 12.5px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}
.review__text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
}
.block-more {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 13px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}
.block-more:active { border-color: var(--brand); }

/* ------------------------------------------ страница внутри мини-аппа */

/* Статья базы знаний кадром: занимает экран под верхней панелью,
   прокручивается сама. Подвала у этого вида нет. */
body.view-page .screen { padding-bottom: calc(10px + var(--safe-bottom)); }
/* Кадр статьи занимает экран и прокручивается сам; расписание
   картинками — обычная страница, прокручивается вместе с мини-аппом. */
.page-view--frame {
  display: flex;
  flex-direction: column;
  height: calc(var(--tg-viewport-stable-height, 100dvh) - 80px - var(--safe-top) - var(--safe-bottom));
  min-height: 360px;
}
/* полоса сверху места не занимает — кадру достаётся её высота */
body.bar-float .page-view--frame {
  height: calc(var(--tg-viewport-stable-height, 100dvh) - 34px - var(--safe-top) - var(--safe-bottom));
}
.page-view__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.page-view__titles { flex: 1; min-width: 0; }
.page-view__title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
  /* «Профильная математика» не влезает в строку рядом с кнопкой */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.page-view__sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.page-view__open {
  flex: none;
  padding: 9px 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.page-view__frame-wrap {
  position: relative;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  /* у статьи свой белый фон — тёмная тема его не перекрашивает */
  background: #FFFFFF;
}
.page-view__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.page-view__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}
.page-view__frame-wrap--ready .page-view__loading { display: none; }
.page-view__spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--brand-soft-2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------ расписание картинками */

.page-view__wait {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 0;
  color: var(--muted);
  font-size: 14px;
}
.sched__updated { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }
.sched__teacher {
  margin: 18px 0 2px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.sched__section { margin-bottom: 18px; }
.sched__title { margin: 12px 0 8px; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.sched__image { margin-bottom: 8px; }
.sched__more {
  display: block;
  width: 100%;
  margin: 6px 0 8px;
  padding: 13px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* ------------------------------------------------- картинка крупно */

body.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(10, 9, 8, .97);
  animation: fadeIn .2s var(--ease) both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* Сцена: картинка по центру, жесты — свои (zoomable в app.js), поэтому
   браузеру прокрутка и масштаб здесь не отдаются */
.lightbox__stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(56px + var(--safe-top)) 12px calc(48px + var(--safe-bottom));
  overflow: hidden;
  touch-action: none;
}
.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  background: #fff;
  transform-origin: 50% 50%;
  will-change: transform;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  cursor: zoom-in;
}
.lightbox--zoomed .lightbox__img { cursor: grab; }
/* после жеста — доехать до места плавно; во время жеста — ровно за пальцем */
.lightbox__img--settle { transition: transform .26s var(--ease); }
.lightbox--zoomed .lightbox__hint { opacity: 0; }
.lightbox__hint { transition: opacity .2s var(--ease); }
/* смахнули — фон гаснет вслед за картинкой */
.lightbox--closing { transition: opacity .18s var(--ease); opacity: 0; }
.lightbox__close {
  position: absolute;
  top: calc(12px + var(--safe-top));
  right: 12px;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  /* тёмный кружок: крестик виден и на тёмном фоне, и поверх увеличенной
     белой картинки (на светлом полупрозрачном он пропадал) */
  background: rgba(20, 17, 15, .6);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .22);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
/* «Сохранить на телефон» у картинки расписания */
.lightbox__save {
  position: absolute;
  left: 50%;
  bottom: calc(44px + var(--safe-bottom));
  z-index: 1;
  transform: translateX(-50%);
  padding: 13px 22px;
  border: 0;
  border-radius: 99px;
  background: var(--brand-strong);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: var(--shadow-2);
  cursor: pointer;
}
.lightbox__save:active { transform: translateX(-50%) scale(.96); }
/* место под кнопку, чтобы она не закрывала низ картинки */
.lightbox--save .lightbox__stage { padding-bottom: calc(104px + var(--safe-bottom)); }
.lightbox__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(14px + var(--safe-bottom));
  text-align: center;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .7);
  pointer-events: none;
}

/* ------------------------------------------------------ уведомление */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-bottom));
  z-index: 80;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow-1);
  opacity: 0;
  transform: translate3d(-50%, 10px, 0);
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.toast--on { opacity: 1; transform: translate3d(-50%, 0, 0); }
body.native-cta .toast { bottom: calc(20px + var(--safe-bottom)); }

/* ------------------------------------------------- загрузка и состояния */

/* Ждём ответ сервера на открытие. Содержимое проявляется с задержкой:
   на быстрой сети экран загрузки не успевает мелькнуть. */
.loading {
  min-height: 62dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}
.loading > * { animation: loadingIn .45s var(--ease) .2s both; }
@keyframes loadingIn {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
  to { opacity: 1; transform: none; }
}
.loading__mark {
  position: relative;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
}
.loading__mark::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--brand-soft);
  animation: loadingPulse 1.6s ease-in-out infinite;
}
@keyframes loadingPulse {
  0%, 100% { transform: scale(.86); opacity: 1; }
  50% { transform: scale(1.06); opacity: .55; }
}
.loading__logo {
  position: relative;
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 8px 18px rgba(255, 107, 0, .25));
}
.loading__text { margin: 0; font-size: 15px; font-weight: 600; color: var(--muted); }
.loading__bar {
  width: 140px;
  height: 4px;
  border-radius: 99px;
  background: var(--brand-soft);
  overflow: hidden;
}
.loading__fill {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #FF9A4D);
  animation: loadingSlide 1.2s var(--ease) infinite;
}
@keyframes loadingSlide {
  from { transform: translateX(-100%); }
  to { transform: translateX(250%); }
}

/* Знак на экранах ошибок: ссылка устарела, чужая ссылка, нет сети */
.state-emoji {
  width: 104px;
  height: 104px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  font-size: 46px;
  border-radius: 50%;
  background: var(--brand-soft);
  animation: pop .5s var(--ease) both;
}

/* -------------------------------------------------------------- интро */

.hero { text-align: center; padding-top: 8px; }
.hero__title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.1;
  margin: 18px 0 10px;
}
.hero__text { color: var(--muted); margin: 0 auto 22px; max-width: 330px; }
.hero__facts { display: grid; gap: 10px; text-align: left; }
.fact {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 15px;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.fact__ico { font-size: 20px; }
.fact__text { font-size: 14px; color: var(--ink-2); }
.fact__text b { color: var(--ink); }

/* Знак Умскул на первом экране */
.hero__logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  display: block;
  filter: drop-shadow(0 10px 22px rgba(255, 107, 0, .28));
}

/* Маскот на экранах «Готово!» и «закрыто» — медведь (`bear()` в app.js) */
.mascot {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 10px 22px rgba(255, 107, 0, .28));
}

/* ---------------------------------------------------------- медведь */

/* Одно движение на экран и по смыслу. Без покачивания и наклона. */
.bear { display: block; transform-origin: 50% 62%; }
.bear__svg { display: block; width: 100%; height: 100%; }

/* Появление: мягко поднимается и проявляется */
@keyframes bearIn {
  from { opacity: 0; transform: translateY(10px) scale(.94); }
  to { opacity: 1; transform: none; }
}
/* «Готово!»: пружинистее — единственный праздничный момент */
@keyframes bearPop {
  0% { opacity: 0; transform: scale(.7); }
  55% { opacity: 1; transform: scale(1.06); }
  78% { transform: scale(.985); }
  100% { opacity: 1; transform: none; }
}
.bear--hero, .bear--menu, .bear--closed { animation: bearIn .5s cubic-bezier(.2, .8, .2, 1) both; }
.bear--done { animation: bearPop .7s cubic-bezier(.3, .7, .3, 1) both; }

/* Блик — полоса света со стороны в сторону по стёклам; вне стёкол её
   срезает clipPath. Один раз после появления; на загрузке — по кругу. */
.bear__glint { transform: translateX(-120px); }
@keyframes bearGlint {
  from { transform: translateX(-120px); }
  to { transform: translateX(190px); }
}
@keyframes bearGlintLoop {
  0% { transform: translateX(-120px); }
  55%, 100% { transform: translateX(190px); }
}
.bear--hero .bear__glint { animation: bearGlint .8s cubic-bezier(.45, 0, .25, 1) .55s both; }
.bear--menu .bear__glint { animation: bearGlint .8s cubic-bezier(.45, 0, .25, 1) .45s both; }
.bear--done .bear__glint { animation: bearGlint .8s cubic-bezier(.45, 0, .25, 1) .7s both; }
.bear--loading .bear__glint { animation: bearGlintLoop 1.8s cubic-bezier(.45, 0, .25, 1) infinite; }

/* ------------------------------------------------------------- результат */

.result__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 99px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 13px;
}
.summary {
  margin-top: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 2px solid var(--line);
  overflow: hidden;
}
.summary__row {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  animation: pop .4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms + 120ms);
}
.summary__row:last-child { border-bottom: 0; }
.summary__key { font-size: 13px; color: var(--muted); flex: none; width: 108px; padding-top: 1px; }
.summary__val { font-weight: 600; font-size: 15px; flex: 1; }

/* Отбивка: экран-реакция на ответ — 5–6 класс, действующий ученик */
.notice__list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.notice__item {
  display: flex;
  gap: 10px;
  padding: 13px 15px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.4;
}
.notice__item::before {
  content: "✦";
  color: var(--brand-ink);
  flex: none;
}

.note {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

/* --------------------------------------------------------------- footer */

.footer {
  position: sticky;
  bottom: 0;
  z-index: 20;
  padding: 12px var(--pad) calc(12px + var(--safe-bottom));
  background: linear-gradient(to top, var(--bg) 62%, transparent);
}
.footer[hidden] { display: none; }

.btn {
  width: 100%;
  padding: 17px 20px;
  border: 0;
  border-radius: var(--radius);
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: transform .16s var(--ease), opacity .2s var(--ease), box-shadow .2s var(--ease);
}
.btn--primary {
  color: #fff;
  background: var(--brand-strong);
  box-shadow: var(--shadow-2);
}
.btn--primary:active { transform: scale(.975); }
.btn:disabled {
  background: var(--disabled-bg);
  color: var(--disabled-ink);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
.btn--ghost {
  margin-top: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  padding: 12px;
  box-shadow: none;
}

.footer__hint {
  margin: 8px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  min-height: 15px;
}

/* ------------------------------------------------------------- конфетти */

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  overflow: hidden;
}
.confetti__piece {
  position: absolute;
  top: -14px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  animation: fall linear forwards;
}
@keyframes fall {
  0% { opacity: 1; transform: translate3d(0, -10vh, 0) rotate(0deg); }
  100% { opacity: .15; transform: translate3d(var(--dx, 0), 105vh, 0) rotate(var(--rot, 540deg)); }
}

/* ------------------------------------------------- пояснение к выбору */

/* Под вариантами, когда выбор кончает анкету (5–6 класс, «учитель или
   другое»): что будет дальше. Подтверждение — штатной кнопкой. */
.step-confirm {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
}
.step-confirm[hidden] { display: none; }

/* «Окончил(а) школу» — на всю ширину ряда под сеткой классов */
.grade--grad { grid-column: span 2; }
.grade__num--grad { font-size: 22px; line-height: 26px; }

/* Флажок «уже учусь в Умскул» в экспресс-анкете */
.option--toggle { margin-top: 18px; padding: 12px 14px; }
.option--toggle .option__emoji { width: 36px; height: 36px; font-size: 18px; }

/* Цель ещё не выбрана: ползунок без заливки, число — прочерком */
.slider--unset::-webkit-slider-thumb { border-color: var(--line); box-shadow: var(--shadow-1); }
.slider--unset::-moz-range-thumb { border-color: var(--line); box-shadow: var(--shadow-1); }
.goal-card__value--empty { color: var(--muted); }

/* ------------------------------------------------- ошибка отправки */

.step__subtitle--error { color: var(--danger-ink); font-weight: 700; }
.result__error {
  margin: -4px 0 16px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--ink);
}
.result__error-title { font-weight: 800; color: var(--danger-ink); }
.result__error-text { margin-top: 3px; font-size: 14.5px; line-height: 1.4; }

/* Перерисовка того же экрана (ошибка, кнопка в работе) — без появления */
.step--still, .step--still * { animation: none !important; }

/* ------------------------------------------------- действия в меню */

/* «Записаться на курс» и «Задать вопрос менеджеру» — в меню и под разделом */
.action-panel {
  display: grid;
  gap: 10px;
  margin: 22px 0 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.action-panel__title { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.action-panel__btn { padding: 14px 18px; font-size: 15.5px; }
.action-panel__error { margin: 0; font-size: 14px; line-height: 1.4; color: var(--danger-ink); font-weight: 600; }
.btn--secondary {
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--line);
}
.btn--secondary:active { transform: scale(.975); border-color: var(--brand); }
.menu__retake { margin-top: 4px; }

/* Ссылка на канал средней школы — нажимается */
.junior__link { margin-top: 16px; }

/* ----------------------------------------------------- мелкая адаптация */

@media (max-width: 360px) {
  :root { --pad: 16px; }
  .step__title { font-size: 23px; }
  .hero__title { font-size: 26px; }
  .chip { padding: 10px 13px; font-size: 13.5px; }
  .option { padding: 14px; gap: 11px; }
  .option__emoji { width: 40px; height: 40px; font-size: 20px; }
  /* таблица «за год / за всё время» на 320 px была на 32 px шире экрана */
  .block-compare { font-size: 14px; }
  .block-compare th, .block-compare td { padding: 10px 7px; }
  .block-compare tbody th { padding-left: 12px; }
  .block-compare tbody td:last-child, .block-compare thead th:last-child { padding-right: 12px; }
  .block-compare thead th { letter-spacing: 0; }
}

@media (min-width: 480px) {
  .grid-grades { grid-template-columns: repeat(4, 1fr); }
  .grade--grad { grid-column: span 1; }
}

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