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

:root {
  /* Бренд Умскул: оранжевый, чёрный, белый */
  --brand: #FF6B00;
  --brand-600: #EA5F00;
  --brand-700: #C24E00;
  --brand-soft: #FFF1E6;
  --brand-soft-2: #FFD9BE;
  --accent: #14110F;
  --accent-ink: #FFFFFF;

  /* Нейтральные */
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F7F4F2;
  --ink: #14110F;
  --ink-2: #3D3835;
  --muted: #837A74;
  --line: #EDE7E2;

  --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;
    --accent: #FBF7F4;
    --accent-ink: #14110F;
    --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;
  --accent: #FBF7F4;
  --accent-ink: #14110F;
  --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; }

/* -------------------------------------------------------------- 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);
  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);
  font-size: 12px;
  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);
  color: #fff;
  font-size: 10px;
  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);
  border-color: var(--brand);
  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: 10px;
  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); }

/* Чипы предметов */
.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);
  background: var(--brand);
  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);
  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);
  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); }

/* Оценки (ОГЭ / школа) */
.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);
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-2);
}

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

.menu__logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  display: block;
  animation: pop .5s var(--ease) both;
}

.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(96px, 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;
  letter-spacing: -.03em;
  color: var(--brand);
}
.stat__label { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.3; }

.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: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brand);
}

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

/* Ждём ответ сервера на открытие. Содержимое проявляется с задержкой:
   на быстрой сети экран загрузки не успевает мелькнуть. */
.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));
  animation: pop .5s var(--ease) both;
}

/* Маскот */
.mascot { width: 128px; height: 128px; margin: 0 auto; display: block; }
.mascot__cap { fill: var(--ink); }
.mascot__cap-line { stroke: var(--ink); fill: none; }
.mascot__spark { fill: var(--brand); }
.mascot__body { animation: float 3.4s ease-in-out infinite; transform-origin: 50% 60%; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-9px) rotate(1.5deg); }
}
.mascot__eye { animation: blink 4.6s infinite; transform-origin: center; }
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(.1); }
}
.mascot__spark { animation: spark 2.6s ease-in-out infinite; transform-origin: center; }
@keyframes spark {
  0%, 100% { opacity: .35; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

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

.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);
  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: linear-gradient(120deg, var(--brand) 0%, var(--brand-600) 100%);
  box-shadow: var(--shadow-2);
}
.btn--primary:active { transform: scale(.975); }
.btn:disabled {
  opacity: .42;
  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)); }
}

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

@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; }
}

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

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