/* =========================================================
   CODDY · Осенний квест «Найди 5 тыкв»
   ========================================================= */

:root {
  --night-0: #0b0820;
  --night-1: #120c2c;
  --night-2: #1d1446;
  --night-3: #2a1d5e;
  --violet: #6a4fd1;
  --violet-soft: #a78bfa;
  --brand-purple: #722a91;
  --pumpkin: #ff8a1f;
  --pumpkin-hot: #ffb347;
  --glow: #ffd27a;
  --mint: #3ddc97;
  --text: #f7f3ff;
  --muted: #bdb3e6;
  --danger: #ff6b6b;
  --card: rgba(36, 25, 82, 0.72);
  --line: rgba(167, 139, 250, 0.28);
  --radius: 24px;
  /* радиусы по назначению: мелкие элементы ввода → панели → крупные «награды» */
  --r-s: 10px; --r-m: 16px; --r-l: 24px; --r-xl: 32px;
  /* Fredoka One — только слово CODDY (требование бренда; .coddy, .cf__brand).
     Golos Text — нео-гротеск с кириллицей в духе референса (заголовки и текст);
     Unbounded — выразительный акцент: лейблы, цифры, имя монстра. Обе — Google Fonts, OFL. */
  --font: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-accent: 'Unbounded', 'Golos Text', system-ui, sans-serif;
  --font-fun: 'Unbounded', 'Golos Text', system-ui, sans-serif;
  /* единый контейнер и адаптивные поля */
  --container: clamp(1320px, 82vw, 1560px);
  --gutter: clamp(16px, 4.2vw, 64px);
  --header-h: clamp(60px, 7vh, 76px);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.is-locked, html.is-locked body { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--night-0);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; }
/* CODDY всегда шрифтом Fredoka One. У шрифта одно начертание (400) — запрещаем браузеру «дорисовывать» жирность */
.coddy, .cf__brand { font-family: 'Fredoka One', 'Fredoka', var(--font); font-weight: 400; font-style: normal; font-synthesis: none; letter-spacing: .01em; text-transform: none; }
/* в разрядке заглавных лейблов — та же разрядка и чуть крупнее, чтобы слово не «проваливалось» */
.eyebrow .coddy, .r-label .coddy { letter-spacing: .06em; font-size: 1.15em; line-height: 1; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border-radius: 999px; border: 0;
  font-weight: 800; font-size: 17px; text-decoration: none; cursor: pointer;
  transition: transform .15s var(--ease-out), box-shadow .2s, background .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn:active { transform: scale(.96); }
.btn--primary {
  color: #2a1204;
  background: linear-gradient(180deg, #ffc067 0%, var(--pumpkin) 60%, #f06d0a 100%);
  box-shadow: 0 10px 30px -8px rgba(255, 138, 31, .7), inset 0 2px 0 rgba(255, 255, 255, .45);
}
.btn--primary:hover { box-shadow: 0 14px 40px -6px rgba(255, 138, 31, .9), inset 0 2px 0 rgba(255, 255, 255, .45); }
.btn--pulse:not(:disabled) { animation: btnPulse 2.4s ease-in-out infinite; }
.btn--ghost { background: rgba(167, 139, 250, .14); border: 1.5px solid var(--line); color: var(--text); }
.btn--ghost:hover { background: rgba(167, 139, 250, .24); }
.btn--small { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn--wide { width: 100%; }
.btn:disabled { cursor: not-allowed; opacity: .45; filter: saturate(.5); box-shadow: none; }
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 10px 30px -8px rgba(255, 138, 31, .7), 0 0 0 0 rgba(255, 179, 71, .45), inset 0 2px 0 rgba(255,255,255,.45); }
  50% { box-shadow: 0 10px 30px -8px rgba(255, 138, 31, .7), 0 0 0 12px rgba(255, 179, 71, 0), inset 0 2px 0 rgba(255,255,255,.45); }
}

/* =========================================================
   ПЕРВЫЙ ЭКРАН
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 80% at 70% 10%, #3a2675 0%, transparent 55%),
    radial-gradient(90% 70% at 10% 90%, #3b1d5c 0%, transparent 60%),
    linear-gradient(180deg, #1a1240 0%, var(--night-1) 55%, var(--night-0) 100%);
}

/* ---------- Небо: звёзды, облака, туман, летучие мыши ---------- */
.sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sky__stars { position: absolute; inset: -10%; background-repeat: repeat; }
.sky__stars--a {
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, #fff 60%, transparent),
    radial-gradient(1px 1px at 120px 80px, #fff 60%, transparent),
    radial-gradient(1.2px 1.2px at 200px 160px, #e9e1ff 60%, transparent),
    radial-gradient(1px 1px at 60px 200px, #fff 60%, transparent);
  background-size: 240px 240px;
  opacity: .55;
  animation: twinkle 5s ease-in-out infinite;
}
.sky__stars--b {
  background-image:
    radial-gradient(2px 2px at 50px 90px, #ffe7a8 60%, transparent),
    radial-gradient(1.4px 1.4px at 260px 40px, #fff 60%, transparent),
    radial-gradient(1.6px 1.6px at 170px 260px, #d9ceff 60%, transparent);
  background-size: 330px 330px;
  opacity: .7;
  animation: twinkle 7s ease-in-out infinite reverse;
}
@keyframes twinkle { 0%, 100% { opacity: .35; } 50% { opacity: .85; } }
.sky__moonglow {
  position: absolute; width: 60vmax; height: 60vmax; right: -18vmax; top: -24vmax;
  background: radial-gradient(circle, rgba(185, 168, 255, .28) 0%, rgba(185, 168, 255, .08) 35%, transparent 65%);
}
.sky__cloud {
  position: absolute; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(170, 150, 240, .30), rgba(170, 150, 240, .10) 60%, transparent);
  animation: drift 40s linear infinite;
}
.sky__cloud--1 { width: 46vw; height: 14vw; left: -10vw; top: 18%; }
.sky__cloud--2 { width: 36vw; height: 11vw; right: -8vw; top: 52%; animation-duration: 55s; animation-direction: reverse; }
.sky__cloud--3 { width: 60vw; height: 16vw; left: 20vw; bottom: -4vw; opacity: .8; animation-duration: 70s; }
@keyframes drift { 0% { transform: translateX(-4vw); } 50% { transform: translateX(4vw); } 100% { transform: translateX(-4vw); } }
.sky__fog {
  position: absolute; left: -10%; right: -10%; bottom: 0; height: 34%;
  background:
    radial-gradient(60% 70% at 30% 100%, rgba(120, 90, 200, .35), transparent 70%),
    radial-gradient(50% 60% at 75% 100%, rgba(255, 140, 60, .14), transparent 70%),
    linear-gradient(180deg, transparent, rgba(11, 8, 32, .85));
  animation: fog 18s ease-in-out infinite alternate;
}
@keyframes fog { from { transform: translateX(-2%); } to { transform: translateX(2%); } }
.bat { position: absolute; width: 54px; opacity: .85; filter: drop-shadow(0 0 6px rgba(255, 210, 122, .25)); }
/* мыши летают ниже шапки и не пересекают логотип */
.bat--1 { top: calc(var(--header-h) + 14%); left: -60px; animation: batFly 21s linear infinite 3s; }
.bat--2 { top: calc(var(--header-h) + 34%); left: -60px; width: 36px; animation: batFly 29s linear infinite 12s; opacity: .6; }
@media (max-width: 767px) { .bat { display: none; } .sky__cloud--2 { animation: none; } }
@keyframes batFly {
  0% { transform: translate(0, 0) scaleY(1); }
  10% { transform: translate(12vw, -3vh) scaleY(.7); }
  20% { transform: translate(24vw, 2vh) scaleY(1); }
  30% { transform: translate(36vw, -2vh) scaleY(.7); }
  40% { transform: translate(48vw, 3vh) scaleY(1); }
  50% { transform: translate(60vw, -1vh) scaleY(.7); }
  60% { transform: translate(72vw, 2vh) scaleY(1); }
  70% { transform: translate(84vw, -3vh) scaleY(.7); }
  80%, 100% { transform: translate(calc(100vw + 120px), 0) scaleY(1); }
}

/* ---------- Шапка: как на coddyschool.com, с осенними акцентами ---------- */
.site-header {
  position: relative; z-index: 20; flex: none; height: var(--header-h);
  background: linear-gradient(180deg, rgba(10, 6, 30, .72), rgba(10, 6, 30, .35));
  border-bottom: 1px solid rgba(255, 179, 71, .16);
  box-shadow: 0 1px 0 rgba(255, 138, 31, .08), 0 12px 30px -20px rgba(255, 138, 31, .35);
}
.site-header__inner { height: 100%; display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
/* логотип-облачко, как на сайте, свисает под шапку */
.brand { flex: none; align-self: flex-start; display: block; margin-top: 6px; line-height: 0; border-radius: 50%; }
.brand img { width: clamp(54px, 5.4vw, 74px); height: auto; filter: drop-shadow(0 6px 16px rgba(0, 149, 182, .35)); }
.site-nav { display: flex; gap: clamp(16px, 2.2vw, 32px); margin-left: auto; }
.site-nav a { position: relative; padding: 8px 0; font-weight: 700; font-size: 15px; text-decoration: none; color: #eae4ff; }
.site-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; border-radius: 2px; background: var(--pumpkin); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease-out); }
.site-nav a:hover { color: #fff; }
.site-nav a:hover::after { transform: scaleX(1); }
.site-phone {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid rgba(255, 179, 71, .45); color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.site-phone svg { width: 18px; height: 18px; color: var(--pumpkin-hot); }
.site-phone:hover { background: rgba(255, 138, 31, .14); border-color: var(--pumpkin-hot); }

/* ---------- Текстовая часть ---------- */
.hero__body { flex: 1; min-height: 0; display: grid; position: static; }
.hero__text { position: relative; z-index: 2; container-type: inline-size; }
.eyebrow {
  margin: 0 0 clamp(12px, 1.6vh, 20px); display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-accent); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--pumpkin-hot);
}
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--pumpkin); box-shadow: 0 0 12px var(--pumpkin); }
/* Заголовок: 3 намеренные строки; размер подбирается под ширину колонки, чтобы строки не ломались */
.title {
  margin: 0 0 clamp(14px, 2vh, 22px);
  font-family: var(--font); font-weight: 600; line-height: 1.02; letter-spacing: -.035em;
  /* длина строки «монстр-программист!» ≈ 10,25 em → 9,4cqi заполняет колонку с запасом ~3% */
  font-size: clamp(28px, 9.4cqi, 76px);
  color: #fff;
}
.title__line { display: block; }
.title__line--accent { filter: drop-shadow(0 0 24px rgba(255, 138, 31, .35)); }
.word { display: inline-block; overflow: hidden; padding: .06em .02em .14em; margin: -.06em -.02em -.14em; vertical-align: top; }
.word__in { display: inline-block; }
.title__line--accent .word__in {
  background: linear-gradient(92deg, #ffd27a 0%, #ffb347 35%, #ff7a1a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.story { margin: 0 0 clamp(20px, 3vh, 32px); color: #d6cff5; font-weight: 400; font-size: clamp(17px, 1.3vw, 20px); line-height: 1.5; max-width: 34em; text-wrap: pretty; }
.story b { font-weight: 700; color: #fff; }

/* Правило в три шага */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 440px; margin: 0 0 24px; padding: 0; }
.steps__item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px;
  border-radius: var(--r-m); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .2);
  font-weight: 600; font-size: 13px; line-height: 1.2; text-align: center;
}
.steps__item + .steps__item::before { content: ''; position: absolute; left: -11px; top: 50%; width: 8px; height: 2px; border-radius: 2px; background: rgba(255, 179, 71, .7); }
.steps__icon { width: 30px; height: 30px; transition: transform .35s var(--ease-spring); }
.steps__item.is-active .steps__icon { transform: scale(1.12) rotate(-4deg); }
/* этап игры: активный шаг подсвечен, пройденный — с галочкой */
.steps__item { transition: background .3s, box-shadow .3s, opacity .3s; }
.steps__item.is-active { background: rgba(255, 138, 31, .16); box-shadow: inset 0 0 0 1.5px rgba(255, 179, 71, .7), 0 0 26px -8px rgba(255, 138, 31, .8); }
.steps__item.is-done { opacity: .7; }
.steps__item.is-done::after {
  content: ''; position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%230b3d2b' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.steps__short { display: none; }

/* ---------- Счётчик и подсказка ---------- */
.hud { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.counter.is-glow { animation: counterGlow 1.1s ease-out; }
@keyframes counterGlow {
  0% { box-shadow: 0 0 0 0 rgba(255, 210, 122, .9), 0 0 24px -6px rgba(255, 138, 31, .45); border-color: var(--glow); }
  100% { box-shadow: 0 0 0 16px rgba(255, 210, 122, 0), 0 0 24px -6px rgba(255, 138, 31, .45); }
}
.fly-pumpkin { position: absolute; width: 40px; height: auto; pointer-events: none; filter: drop-shadow(0 0 10px rgba(255, 179, 71, .9)); }

/* Подсказка новичку в сцене: тёмная плашка + белый текст (контраст ~16:1), оранжевый знак действия */
.coach {
  position: absolute; left: 50%; top: 8px; z-index: 65; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 12px; width: max-content; max-width: min(calc(100vw - 24px), 480px);
  padding: 8px 18px 8px 8px; border-radius: 999px;
  background: rgba(22, 14, 52, .94); color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 179, 71, .75), 0 12px 30px -10px rgba(0, 0, 0, .8), 0 0 28px -8px rgba(255, 138, 31, .7);
  pointer-events: none;
  animation: coachIn .6s var(--ease-spring) 1s both, coachPulse 2.4s ease-in-out 2s infinite;
}
.coach__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(180deg, #ffc067, var(--pumpkin)); color: #2a1204; }
.coach__hand { width: 22px; height: 22px; animation: tapHint 1.4s ease-in-out 1.6s infinite; }
.coach__text { display: grid; gap: 1px; text-align: left; line-height: 1.2; }
.coach__text b { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.coach__text small { font-size: 13px; font-weight: 500; color: #ffd27a; }
.coach.is-hidden { animation: coachOut .3s ease-in forwards; }
@keyframes coachOut { to { opacity: 0; visibility: hidden; transform: translate(-50%, -10px) scale(.95); } }
@keyframes coachIn { from { opacity: 0; transform: translate(-50%, -14px) scale(.9); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes coachPulse {
  0%, 100% { box-shadow: inset 0 0 0 1.5px rgba(255, 179, 71, .75), 0 12px 30px -10px rgba(0, 0, 0, .8), 0 0 0 0 rgba(255, 179, 71, .45); }
  50% { box-shadow: inset 0 0 0 1.5px rgba(255, 210, 122, 1), 0 12px 30px -10px rgba(0, 0, 0, .8), 0 0 0 8px rgba(255, 179, 71, 0); }
}
@keyframes tapHint { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(3px) scale(.88); } }

/* Челлендж «Сыграть на время»: добровольный, под подсказкой; таймер — на месте подсказки */
.challenge {
  position: absolute; left: 50%; top: 74px; z-index: 64; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px 6px 10px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(22, 14, 52, .88); color: #fff; box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .45), 0 10px 24px -12px rgba(0, 0, 0, .8);
  font: inherit; text-align: left; white-space: nowrap; touch-action: manipulation;
  animation: coachIn .6s var(--ease-spring) 1.4s both; transition: background .2s, box-shadow .2s;
}
.challenge[hidden] { display: none; }
.challenge svg { flex: none; width: 22px; height: 22px; color: var(--glow); }
.challenge span { display: grid; line-height: 1.2; }
.challenge b { font-size: 14px; font-weight: 700; }
.challenge small { font-size: 12px; font-weight: 500; color: #d9d1fa; }
.challenge:hover { background: rgba(48, 32, 104, .95); box-shadow: inset 0 0 0 1.5px var(--glow), 0 10px 24px -12px rgba(0, 0, 0, .8); }
.timer {
  position: absolute; left: 50%; top: 8px; z-index: 66; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; width: max-content; max-width: min(calc(100vw - 24px), 460px); padding: 8px 16px 8px 12px; border-radius: 999px;
  background: rgba(22, 14, 52, .94); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(167, 139, 250, .5), 0 10px 24px -12px rgba(0, 0, 0, .8);
  pointer-events: none; transition: box-shadow .3s;
}
.timer[hidden] { display: none; }
.timer svg { flex: none; width: 20px; height: 20px; color: var(--glow); }
.timer__value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.timer__msg { font-size: 14px; font-weight: 600; line-height: 1.3; color: #ffe2a8; }
.timer__msg:empty { display: none; }
/* последние 10 секунд — тёплый жёлтый, без красного и мигания */
.timer.is-low { box-shadow: inset 0 0 0 1.5px var(--glow), 0 0 22px -6px rgba(255, 210, 122, .8); }
.timer.is-low .timer__value { color: var(--glow); }
.timer.is-paused { opacity: .7; }
.timer.is-expired .timer__value { display: none; }
.timer.is-done { box-shadow: inset 0 0 0 1.5px var(--mint), 0 0 22px -6px rgba(61, 220, 151, .7); }
.timer.is-done .timer__msg { color: #b8f5d8; }
.result__time { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 6px 14px; border-radius: 999px; background: rgba(61, 220, 151, .14); color: #c9f7e2; font-weight: 600; font-size: 14px; }
.result__time[hidden] { display: none; }
.result__time::before { content: ''; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='13.5' r='7.5' fill='none' stroke='%233ddc97' stroke-width='2'/%3E%3Cpath d='M12 9.5v4l2.5 2M9.5 3h5M12 3v3' fill='none' stroke='%233ddc97' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Подпись «Ответ засчитан» */
.toast {
  position: absolute; left: 50%; top: 8px; z-index: 66; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(420px, calc(100vw - 2 * var(--gutter))); padding: 10px 18px 10px 10px; border-radius: 18px;
  background: rgba(20, 13, 48, .94); box-shadow: inset 0 0 0 1px rgba(61, 220, 151, .45),
  0 14px 40px -10px rgba(0, 0, 0, .7), 0 0 30px -10px rgba(61, 220, 151, .6);
  font-size: 15px; line-height: 1.3; pointer-events: none;
}
.toast b { display: block; color: var(--mint); font-size: 16px; }
.toast__check { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--mint); color: #0b3d2b; }
.toast__check svg { width: 18px; height: 18px; }
.counter {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 12px; border-radius: 999px;
  background: rgba(20, 13, 48, .78);
  border: 1.5px solid rgba(255, 179, 71, .45);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6), 0 0 24px -6px rgba(255, 138, 31, .45);
  font-weight: 700; font-size: 16px; white-space: nowrap;
}
.counter__pips { display: flex; gap: 5px; }
.counter__pips i {
  width: 14px; height: 13px; border-radius: 50% 50% 46% 46%;
  background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1.5px rgba(255, 179, 71, .5);
  transition: background .3s, box-shadow .3s, transform .3s var(--ease-spring);
}
.counter__pips i.is-on { background: radial-gradient(circle at 40% 35%, #ffd27a, var(--pumpkin) 60%, #c94f0c); box-shadow: 0 0 10px rgba(255, 160, 60, .9); transform: scale(1.15); }
.counter__num { display: inline-block; font-family: var(--font); font-weight: 700; font-size: 21px; font-variant-numeric: tabular-nums; color: var(--glow); min-width: .7em; text-align: center; }
.counter__num.is-bump { animation: bump .5s var(--ease-spring); }
@keyframes bump { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-10px) scale(1.5); } 100% { transform: translateY(0) scale(1); } }
.hint-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border-radius: 999px; border: 1.5px solid var(--line); background: rgba(20, 13, 48, .7);
  font-weight: 700; font-size: 15px; cursor: pointer; transition: background .2s, transform .15s;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.hint-btn svg { width: 20px; height: 20px; color: var(--glow); }
.hint-btn:hover { background: rgba(106, 79, 209, .4); }
.hint-btn:active { transform: scale(.95); }
/* подсказка второстепенна: спокойная кнопка, коротко «вспыхивает», когда тыква подмигнула */
.hint-btn { color: #d9d1fa; }
.hint-btn.is-ping { animation: hintPing 1.2s ease-out; }
@keyframes hintPing { 0% { box-shadow: 0 0 0 0 rgba(255, 210, 122, .8); border-color: var(--glow); } 100% { box-shadow: 0 0 0 14px rgba(255, 210, 122, 0); } }
.hint-btn.is-ping svg { animation: bulb 1.2s ease-out; }
@keyframes bulb { 0%, 60% { color: #fff6c9; filter: drop-shadow(0 0 6px #ffd27a); } 100% { color: var(--glow); filter: none; } }

/* =========================================================
   СЦЕНА
   ========================================================= */
.stage-wrap { position: relative; container-type: size; display: grid; place-items: center; min-height: 0; z-index: 1; }
.stage {
  position: relative;
  width: min(100cqw, 100cqh * 4 / 3);
  aspect-ratio: 4 / 3;
  isolation: isolate;
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  transform: translate3d(calc(var(--px, 0) * -10px), calc(var(--py, 0) * -8px), 0);
  transition: transform .4s var(--ease-out);
}
.stage__float { position: absolute; inset: 0; animation: islandFloat 9s ease-in-out infinite; }
@keyframes islandFloat { 0%, 100% { transform: translateY(-4px); } 50% { transform: translateY(5px); } }
.stage img { -webkit-user-drag: none; user-select: none; }
.stage__glow {
  position: absolute; left: 10%; right: 10%; bottom: -4%; height: 30%; z-index: 0; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(61, 220, 151, .22), transparent 70%);
  filter: blur(8px);
}
.room { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.room--tall { display: none; }

.prop {
  position: absolute; left: var(--wx); top: var(--wy); width: var(--ww); z-index: var(--wz);
  transform-origin: 50% 100%;
}
.prop--float { animation: bookFloat 6s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes bookFloat { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-10%) rotate(4deg); } }
.prop--swing { transform-origin: 50% 0; animation: lampSwing 5s ease-in-out infinite; }
@keyframes lampSwing { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
.prop--monitor { filter: drop-shadow(0 0 18px rgba(124, 95, 255, .45)); }
/* фоновая жизнь мастерской: медленно, тихо, вдали от тыкв */
.prop--sway { transform-origin: 50% 0; animation: curtainSway 7s ease-in-out infinite; }
@keyframes curtainSway { 0%, 100% { transform: skewX(0) rotate(0); } 50% { transform: skewX(-2deg) rotate(.6deg); } }
.prop--breeze { animation: breeze 6s ease-in-out infinite; }
@keyframes breeze { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-1.2deg); } }
.ov { pointer-events: none; height: auto; }
.ov i, .ov img, .ov div { position: absolute; display: block; }
/* монитор: экран «дышит», в нижней строке печатается код */
.ov-screen { left: 4.5%; top: 5.6%; width: 91%; height: 70%; border-radius: 6%; background: radial-gradient(70% 60% at 50% 40%, rgba(160, 140, 255, .28), transparent 70%); opacity: 0; animation: screenPulse 5s ease-in-out infinite; }
@keyframes screenPulse { 0%, 100% { opacity: 0; } 45% { opacity: 1; } 55% { opacity: .6; } }
.ov-type { left: 27.3%; top: 66.1%; width: 31.8%; height: 3.4%; border-radius: 4px; background: linear-gradient(90deg, #3ddc97 0 45%, transparent 45% 52%, #d36bff 52%); transform-origin: left; transform: scaleX(0); animation: typeCode 8s steps(9, end) infinite; }
@keyframes typeCode { 0% { transform: scaleX(0); opacity: 1; } 40%, 80% { transform: scaleX(1); opacity: 1; } 90%, 100% { transform: scaleX(1); opacity: 0; } }
/* робот на полке моргает, лампочка на антенне мигает */
.ov-lid { left: 60.8%; top: 50%; width: 10.8%; height: 5.4%; border-radius: 3px; background: #1a1238; transform-origin: 50% 0; transform: scaleY(0); animation: robotBlink 5.5s infinite; }
@keyframes robotBlink { 0%, 92%, 100% { transform: scaleY(0); } 95% { transform: scaleY(1); } }
.ov-led { left: 64.6%; top: 40.7%; width: 3.1%; aspect-ratio: 1; border-radius: 50%; background: #ffd27a; box-shadow: 0 0 8px 2px rgba(255, 179, 71, .9); opacity: 0; animation: ledBlink 3.2s ease-in-out infinite; }
@keyframes ledBlink { 0%, 60%, 100% { opacity: 0; } 70%, 80% { opacity: 1; } }
/* окно: падающая звезда и редкий гость — летучая мышь на фоне луны */
.ov-glass { left: 13.33%; top: 10%; width: 73.33%; height: 85%; overflow: hidden; border-radius: 50% 50% 0 0 / 32.4% 32.4% 0 0; }
.ov-star { left: 10%; top: 8%; width: 30%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #fff8e1); transform: rotate(24deg) translateX(-60%); opacity: 0; animation: shootingStar 13s ease-in 4s infinite; }
@keyframes shootingStar { 0%, 92% { opacity: 0; transform: rotate(24deg) translateX(-60%); } 94% { opacity: 1; } 99%, 100% { opacity: 0; transform: rotate(24deg) translateX(220%); } }
.ov-bat { left: 0; top: 16%; width: 22%; height: auto; opacity: 0; filter: brightness(.25); animation: batPass 23s linear 9s infinite; }
@keyframes batPass {
  0%, 88% { opacity: 0; transform: translate(-120%, 0) scale(.9); }
  89% { opacity: 1; }
  92% { transform: translate(140%, -18%) scale(1); }
  96% { opacity: 1; transform: translate(380%, 8%) scale(.85); }
  97%, 100% { opacity: 0; transform: translate(460%, 0); }
}
/* пылинки в свете */
.mote { position: absolute; left: var(--wx); top: var(--wy); z-index: 2; width: 5px; height: 5px; border-radius: 50%; pointer-events: none;
  background: #fff3c4; box-shadow: 0 0 8px 2px rgba(255, 220, 140, .6); opacity: 0; animation: moteDrift 9s ease-in-out var(--d, 0s) infinite; }
@keyframes moteDrift { 0% { opacity: 0; transform: translate(0, 0); } 30% { opacity: .7; } 70% { opacity: .5; } 100% { opacity: 0; transform: translate(14px, -46px); } }
.prop--window { filter: drop-shadow(0 0 30px rgba(185, 168, 255, .25)); }

/* ---------- Тыквы ---------- */
.pk {
  position: absolute; left: var(--wx); top: var(--wy); width: var(--ws); z-index: var(--wz);
  transform: translate(-50%, -50%); pointer-events: none;
}
.pk__glow {
  position: absolute; inset: -45%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 90, .55) 0%, rgba(255, 140, 40, .18) 40%, transparent 68%);
  opacity: .14; animation: glint 9s ease-in-out infinite; animation-delay: calc(var(--delay, 0s) * 2.6);
  transition: transform .25s var(--ease-out), opacity .25s;
}
/* тыквы не светятся постоянно: изредка коротко вспыхивают — это манит, но не выдаёт их сразу */
@keyframes glint { 0%, 82%, 100% { opacity: .14; } 88% { opacity: .75; } 93% { opacity: .3; } }
.pk__body { position: relative; transform-origin: 50% 92%; animation: sway 3.4s ease-in-out infinite; animation-delay: var(--delay, 0s); }
@keyframes sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
.pk__img { width: 100%; height: auto; transition: transform .2s var(--ease-spring); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.pk__img--wink { position: absolute; inset: 0; opacity: 0; }
.pk__ring {
  position: absolute; inset: -30%; border-radius: 50%; opacity: 0;
  border: 3px solid rgba(255, 210, 122, .9); box-shadow: 0 0 20px rgba(255, 210, 122, .8);
}
.pk__star { position: absolute; left: 50%; top: 50%; width: 70%; transform: translate(-50%, -50%) scale(0); opacity: 0; }

.pk.is-hover .pk__img { transform: scale(1.14); }
.pk.is-hover .pk__glow { transform: scale(1.3); opacity: 1; animation: none; }
.pk.is-press .pk__img { transform: scale(.78, .7); transition-duration: .08s; }
.pk.is-press .pk__glow { transform: scale(1.5); opacity: 1; }

.pk.is-hint .pk__body { animation: hintHop .8s var(--ease-out) 3; }
.pk.is-hint .pk__img--wink { animation: winkSwap 2.4s steps(1) 1; }
.pk.is-hint .pk__ring { animation: ringPulse 1.2s ease-out 2; }
.pk.is-hint .pk__glow { opacity: 1; transform: scale(1.6); animation: none; }
/* тыква в тени под столом */
.pk--shade-w .pk__img:not(.pk__img--wink) { filter: brightness(.5) saturate(.8) drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
@keyframes hintHop { 0%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-22%) rotate(-8deg); } 60% { transform: translateY(0) rotate(6deg); } }
@keyframes winkSwap { 0% { opacity: 0; } 25% { opacity: 1; } 45% { opacity: 0; } 70% { opacity: 1; } 85% { opacity: 0; } }
@keyframes ringPulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }

.pk.is-found { z-index: 40; }
.pk.is-found .pk__body, .pk.is-found .pk__glow { display: none; }
.pk.is-found .pk__star { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: starIdle 3s ease-in-out infinite; transition: transform .5s var(--ease-spring), opacity .2s; }
@keyframes starIdle { 0%, 100% { filter: drop-shadow(0 0 6px rgba(255, 210, 122, .8)); } 50% { filter: drop-shadow(0 0 16px rgba(255, 210, 122, 1)); } }

/* Невидимая зона нажатия — не меньше 48×48 px */
.hit {
  position: absolute; left: var(--wx); top: var(--wy);
  width: max(48px, calc(var(--ws) * 1.35)); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 50; border: 0; padding: 0; margin: 0; border-radius: 50%;
  background: transparent; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.hit:focus-visible { outline: 3px solid var(--glow); outline-offset: 2px; }
.hit.is-found { cursor: default; }

/* Реакция на «мимо» */
.ripple {
  position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  border: 2px solid rgba(201, 187, 255, .7); pointer-events: none; z-index: 60;
  animation: ripple .5s var(--ease-out) forwards;
}
@keyframes ripple { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }

/* =========================================================
   ЭФФЕКТЫ
   ========================================================= */
.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 200; }
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 201; overflow: hidden; }
.flash {
  position: absolute; width: 160px; height: 160px; margin: -80px 0 0 -80px; border-radius: 50%;
  background: radial-gradient(circle, #fffbe6 0%, rgba(255, 220, 120, .85) 25%, rgba(255, 140, 40, .35) 50%, transparent 70%);
}
.boom {
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--font); font-weight: 900; font-size: 30px; letter-spacing: .02em;
  color: #fff3c4; -webkit-text-stroke: 2px #c94f0c; paint-order: stroke fill;
  text-shadow: 0 4px 0 #7a2a05, 0 0 20px rgba(255, 160, 60, .9);
  white-space: nowrap;
}

/* Переход к результату: подарок из искр */
.reveal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; background: radial-gradient(circle, rgba(29, 20, 70, .55), rgba(11, 8, 32, .92)); }
.reveal { align-content: center; gap: 22px; }
.reveal__gift { width: min(220px, 50vw); filter: drop-shadow(0 0 40px rgba(255, 179, 71, .7)); }
.reveal__caption { margin: 0; padding: 0 24px; text-align: center; font-weight: 800; font-size: clamp(17px, 4.6vw, 22px); color: #fff3c4; animation: twinkle 1.6s ease-in-out infinite; }

/* =========================================================
   ОКНО ВОПРОСА — варианты как игровые предметы
   ========================================================= */
.modal {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center; padding: 16px;
  background: radial-gradient(70% 60% at 50% 45%, rgba(29, 20, 70, .45), rgba(8, 5, 22, .78));
}
.modal__card {
  position: relative; width: min(560px, 100%); max-height: calc(100svh - 32px); overflow: auto;
  padding: 24px 22px 20px; border-radius: var(--r-l);
  background:
    radial-gradient(110% 60% at 50% -10%, rgba(255, 138, 31, .24), transparent 60%),
    linear-gradient(180deg, #2a1d61 0%, #170f3a 100%);
  /* вместо рамки — свет по верхней кромке и глубокая тень */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(167, 139, 250, .12),
    0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 80px -30px rgba(255, 138, 31, .55);
  text-align: center;
}
.modal__chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 999px;
  background: rgba(255, 138, 31, .14); color: var(--pumpkin-hot);
  font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.modal__chip img { width: 26px; }
.modal__title { margin: 14px 0 18px; font-size: clamp(22px, 5.6vw, 30px); font-weight: 700; line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
.modal__options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal__note { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.option {
  --opt: #ffb347;
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px;
  min-height: 168px; padding: 14px 12px 16px; border: 0; border-radius: var(--r-m); cursor: pointer; color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 14px 30px -18px rgba(0, 0, 0, .9);
  font: 700 16px/1.25 var(--font); letter-spacing: -.01em;
  transition: transform .2s var(--ease-out), background .25s, box-shadow .25s, opacity .3s;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
/* пьедестал со светом цвета направления */
.option__stage { position: relative; display: grid; place-items: center; width: 92px; height: 92px; }
.option__stage::before {
  content: ''; position: absolute; left: 8%; right: 8%; bottom: 4%; height: 26%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--opt) 70%, transparent), transparent);
  opacity: .55; transition: opacity .25s, transform .25s;
}
.option__icon { position: relative; width: 82px; height: 82px; transition: transform .35s var(--ease-spring); }
.option__label { text-wrap: balance; }
.option:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; }
@media (hover: hover) {
  .option:hover {
    background: linear-gradient(180deg, color-mix(in srgb, var(--opt) 20%, transparent), rgba(255, 255, 255, .03));
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--opt) 70%, transparent), 0 18px 40px -16px color-mix(in srgb, var(--opt) 60%, transparent);
    transform: translateY(-3px);
  }
  .option:hover .option__icon { transform: translateY(-6px) rotate(-5deg) scale(1.06); }
  .option:hover .option__stage::before { opacity: 1; transform: scaleX(1.15); }
}
.option:active { transform: scale(.96); }
.option.is-picked {
  background: linear-gradient(180deg, color-mix(in srgb, var(--opt) 34%, transparent), color-mix(in srgb, var(--opt) 10%, transparent));
  box-shadow: inset 0 0 0 2px var(--opt), 0 0 50px -10px var(--opt);
}
.option.is-picked .option__stage::before { opacity: 1; }
.option.is-picked::after {
  content: ''; position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--opt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23180f3a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
  animation: pickCheck .35s var(--ease-spring) both;
}
@keyframes pickCheck { from { transform: scale(0); } }
.option.is-dim { opacity: .38; transform: scale(.96); }

/* =========================================================
   РЕЗУЛЬТАТ — награда, а не отчёт
   ========================================================= */
.final {
  position: fixed; inset: 0; z-index: 140; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(80% 46% at 50% 0%, color-mix(in srgb, var(--m-color, #6a4fd1) 30%, transparent), transparent 70%),
    radial-gradient(70% 40% at 50% 100%, rgba(255, 138, 31, .14), transparent 70%),
    #0b0820;
}
.final__inner { width: min(980px, 100%); margin: 0 auto; padding: 28px var(--gutter) calc(40px + env(safe-area-inset-bottom)); }

/* общая типографика финала */
.r-label {
  margin: 0 0 10px; font-family: var(--font-accent); font-weight: 600; font-size: 11px; line-height: 1.3;
  letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--m-color, #ffb347) 75%, #fff);
}
.r-caption { margin: 18px 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); }

.result { text-align: center; overflow-x: clip; overflow-clip-margin: 0; }
.result__hero { position: relative; }
.result__congrats { margin: 0; font-family: var(--font-accent); font-weight: 600; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--pumpkin-hot); }
.result__lead { margin: 8px 0 0; color: var(--muted); font-size: 16px; }

/* сцена монстра: луч прожектора сверху, лучи, светящийся пол */
.monster { position: relative; width: min(320px, 70vw); aspect-ratio: 260 / 280; margin: 6px auto 0; }
.monster__beam {
  position: absolute; left: 50%; top: -40%; width: 120%; height: 150%; transform: translateX(-50%);
  background: conic-gradient(from 180deg at 50% 0%, transparent 155deg, color-mix(in srgb, var(--m-color, #fff) 22%, transparent) 172deg 188deg, transparent 205deg);
  -webkit-mask: linear-gradient(#000 30%, transparent 92%); mask: linear-gradient(#000 30%, transparent 92%);
  pointer-events: none;
}
.monster__rays {
  position: absolute; inset: -22%; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--m-color, #ff8a1f) 34%, transparent) 0deg 8deg, transparent 8deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 64%); mask: radial-gradient(circle, #000 18%, transparent 64%);
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.monster__glow { position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--m-color, #ff8a1f) 55%, transparent), transparent 70%); filter: blur(12px); }
.monster__floor {
  position: absolute; left: 6%; right: 6%; bottom: -3%; height: 16%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--m-color, #ff8a1f) 55%, transparent), color-mix(in srgb, var(--m-color, #ff8a1f) 12%, transparent) 70%, transparent);
}
.monster__img { position: relative; width: 100%; height: auto; animation: monsterIdle 3.6s ease-in-out infinite; transform-origin: 50% 95%; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .45)); }
@keyframes monsterIdle { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-3%) scale(1.02, .98); } }

.result__name {
  margin: 10px 0 0; font-family: var(--font-accent); font-weight: 800; line-height: 1; letter-spacing: -.03em;
  font-size: clamp(40px, 11vw, 84px);
  color: var(--m-color, var(--pumpkin));
  text-shadow: 0 0 40px color-mix(in srgb, var(--m-color, #ff8a1f) 55%, transparent);
}
.result__name:focus { outline: none; }
.result__name .char { display: inline-block; white-space: pre; }
.result__type {
  display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 7px 16px 7px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--m-color, #ff8a1f) 16%, transparent);
  color: #fff; font-weight: 700; font-size: 16px;
}
.result__type::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--m-color, var(--pumpkin)); box-shadow: 0 0 10px var(--m-color, var(--pumpkin)); }

/* «Кто ты» — реплика с хвостиком к монстру */
.result__quote { position: relative; margin: 26px auto 0; max-width: 560px; padding: 20px 24px 22px; border-radius: var(--r-l); background: rgba(255, 255, 255, .06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.result__quote::before { content: ''; position: absolute; left: 50%; top: -9px; width: 18px; height: 18px; transform: translateX(-50%) rotate(45deg); border-radius: 4px 0 0 0; background: rgba(255, 255, 255, .06); clip-path: polygon(0 0, 100% 0, 0 100%); }
.result__quote blockquote { margin: 0; }
.result__quote p { margin: 0; font-size: clamp(17px, 2vw, 19px); line-height: 1.55; color: #f1ecff; text-wrap: pretty; }

/* карточки финала проявляются при прокрутке (класс ставит src/motion.js) */
.reveal-up { transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.reveal-up:not(.is-in) { opacity: 0; transform: translateY(26px); }

/* A → родителям: один мягкий призыв */
.result__handoff { display: grid; justify-items: center; gap: 12px; margin-top: 28px; }
.result__hint { margin: 0; max-width: 38ch; font-size: 15px; line-height: 1.45; color: var(--muted); }
.result__to-parent { gap: 10px; }
.result__to-parent svg { width: 20px; height: 20px; animation: nudgeDown 1.8s ease-in-out infinite; }
@keyframes nudgeDown { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

/* ---------- Единая система секций финала ----------
   kicker (Unbounded, 11px, капс) → заголовок (Golos 700, 26–38px) → лид (17px) → содержимое.
   Поверхности: 1 — карточка (белая вуаль 5% + контур 1px), 2 — акцент (тёплый свет), 3 — подарок (лента). */
.sec { margin-top: clamp(56px, 9vw, 88px); text-align: left; scroll-margin-top: 16px; }
.sec__kicker { margin: 0 0 8px; font-family: var(--font-accent); font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--pumpkin-hot); }
.sec__title { margin: 0; font-size: clamp(26px, 4.4vw, 38px); font-weight: 700; line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; }
.sec__lead { margin: 12px 0 0; max-width: 60ch; font-size: 17px; line-height: 1.55; color: #e9e3ff; text-wrap: pretty; }
.r-caption { margin: 22px 0 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.surface { border-radius: var(--r-l); background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .16); }

/* B. Интересы */
.r-interests__grid { display: grid; gap: 28px; margin-top: 4px; }
.answer-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.answer-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: var(--r-s);
  background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--m-color, #ff8a1f) 35%, transparent);
  font-weight: 600; font-size: 15px; line-height: 1.25;
}
.answer-chip__icon { flex: none; width: 36px; height: 36px; padding: 3px; border-radius: 8px; background: rgba(11, 8, 32, .55); }
.stats { align-self: start; padding: 22px 22px 24px; border-radius: var(--r-l); background: rgba(11, 8, 32, .55); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .16); }
.stats__title { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.stats__hint { margin: 4px 0 18px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.mix { list-style: none; display: grid; gap: 14px; margin: 0; padding: 0; }
.mix__row { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 6px; align-items: center; font-size: 14px; color: #cfc6f2; }
.mix__icon { grid-row: 1 / 3; width: 34px; height: 34px; object-fit: contain; }
.mix__row:not(.is-top) .mix__icon { filter: saturate(.6); opacity: .85; }
.mix__row.is-top { color: #fff; font-weight: 700; }
.mix__label { line-height: 1.25; }
.mix__bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.mix__bar i { height: 8px; border-radius: 3px; background: rgba(255, 255, 255, .1); }
.mix__bar i.is-on { background: var(--c); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); transition-delay: calc(var(--i) * 90ms); }
.final.is-revealed .mix__bar i.is-on { transform: none; }
.mix__row:not(.is-top) .mix__bar i.is-on { opacity: .55; }
.mix__row.is-top .mix__bar i.is-on { box-shadow: 0 0 10px -2px var(--c); }
.disclaimer { display: flex; align-items: flex-start; gap: 8px; margin: 22px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.disclaimer svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--violet-soft); }

/* C. Курсы — компактные карточки, длинные названия переносятся */
.course-list { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 22px 0 0; padding: 0; }
.course__link {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 18px 16px; border-radius: var(--r-m); text-decoration: none; color: var(--text);
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .16);
  transition: transform .2s var(--ease-out), box-shadow .2s, background .2s;
}
.course__link:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--m-color, #ff8a1f) 60%, transparent), 0 16px 30px -20px color-mix(in srgb, var(--m-color, #ff8a1f) 80%, transparent); }
.course__title { font-weight: 700; font-size: 17px; line-height: 1.3; letter-spacing: -.01em; overflow-wrap: anywhere; }
.course__desc { font-size: 14px; line-height: 1.45; color: #cfc6f2; }
.course__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.course__age { padding: 4px 10px; border-radius: 8px; background: rgba(255, 210, 122, .14); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--glow); white-space: nowrap; }
.course__more { margin-left: auto; font-size: 13px; font-weight: 600; color: color-mix(in srgb, var(--m-color, #ff8a1f) 70%, #fff); white-space: nowrap; }
.course__more::after { content: ' →'; }
.courses__note { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* D. Пробное занятие — главный шаг; подарок — отдельная «упакованная» карточка */
.trial__grid { display: grid; gap: 16px; margin-top: 4px; }
.trial__main {
  position: relative; padding: 26px 22px; border-radius: var(--r-xl);
  background: radial-gradient(90% 80% at 0% 0%, rgba(255, 138, 31, .26), transparent 65%), linear-gradient(170deg, #34216f, #1d1347);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(255, 179, 71, .28), 0 40px 80px -50px rgba(255, 138, 31, .9);
}
.trial__badge { display: inline-block; padding: 4px 10px; border-radius: 6px; background: var(--mint); color: #0b3d2b; font-weight: 700; font-size: 13px; }
.trial__title { margin: 12px 0 8px; font-size: clamp(26px, 4.4vw, 38px); font-weight: 700; line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; }
.trial__text { margin: 0; max-width: 52ch; font-size: 17px; line-height: 1.55; color: #eae2ff; }
.trial__steps { list-style: none; counter-reset: t; display: grid; gap: 12px; margin: 20px 0 24px; padding: 0; }
.trial__steps li { position: relative; padding: 3px 0 0 40px; counter-increment: t; font-size: 16px; line-height: 1.45; min-height: 28px; }
.trial__steps li::before { content: counter(t); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 179, 71, .18); color: var(--pumpkin-hot); font-weight: 700; font-size: 14px; }
.trial__cta { width: 100%; }
.gift {
  position: relative; overflow: hidden; padding: 22px; border-radius: var(--r-l); text-align: center;
  background: linear-gradient(180deg, #2a1b5e, #1a1140);
  box-shadow: inset 0 0 0 1px rgba(255, 210, 122, .22);
}
/* лента подарка — сплошная, не пунктир */
.gift::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 14px; transform: translateX(-50%); background: linear-gradient(180deg, rgba(255, 210, 122, .0), rgba(255, 179, 71, .16) 30%, rgba(255, 179, 71, .16) 70%, rgba(255, 210, 122, 0)); pointer-events: none; }
.gift > * { position: relative; }
.gift__visual { position: relative; width: 190px; height: 160px; margin: 0 auto 6px; }
.offer__shine {
  position: absolute; inset: -24%; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 210, 122, .2) 0 7deg, transparent 7deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 15%, transparent 65%); mask: radial-gradient(circle, #000 15%, transparent 65%);
  animation: spin 40s linear infinite;
}
.offer__gift { position: absolute; left: 6%; bottom: 4%; width: 66%; animation: giftFloat 3.4s ease-in-out infinite; filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .45)); }
.offer__monster { position: absolute; right: 0; bottom: 0; width: 46%; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .4)); }
@keyframes giftFloat { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6%) rotate(3deg); } }
.gift__badge { display: inline-block; padding: 4px 10px; border-radius: 6px; background: var(--pumpkin); color: #2a1204; font-weight: 700; font-size: 13px; }
.gift__title { margin: 10px 0 6px; font-family: var(--font-accent); font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.gift__text { margin: 0 auto; max-width: 30ch; font-size: 15px; line-height: 1.5; color: #e6defd; }

/* Для родителей — светлый редакционный лист в общей системе: те же радиусы, шрифты, акцент цвета монстра */
.parent {
  position: relative; display: grid; gap: 8px; margin-top: clamp(56px, 9vw, 88px); padding: 28px 22px 24px; border-radius: var(--r-xl); text-align: left;
  background: linear-gradient(180deg, #fbf8ff, #f1ebff); color: #241a4a; scroll-margin-top: 86px; outline: none; /* над блоком выступает монстр */
  box-shadow: 0 40px 80px -50px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .6) inset;
}
.parent__art { position: relative; width: 150px; height: 130px; margin: -70px auto 0; }
.parent__halo { position: absolute; inset: 8% 10%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--m-color, #ff8a1f) 45%, #fff), color-mix(in srgb, var(--m-color, #ff8a1f) 10%, #fff) 60%, transparent 72%); }
.parent__monster { position: absolute; left: 50%; bottom: 0; width: 104px; height: auto; transform: translateX(-50%); filter: drop-shadow(0 10px 10px rgba(36, 26, 74, .25)); }
.parent__pk { position: absolute; height: auto; }
.parent__pk--1 { left: 0; bottom: 4px; width: 38px; transform: rotate(-10deg); }
.parent__pk--2 { right: 4px; top: 12px; width: 30px; animation: starIdle 3s ease-in-out infinite; }
.parent__badge { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 5px 12px 5px 8px; border-radius: 999px; background: #e9e1ff; color: #4b3489; font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.parent__badge svg { width: 18px; height: 18px; }
.parent__title { margin: 12px 0 10px; font-size: clamp(26px, 4.4vw, 38px); font-weight: 700; line-height: 1.12; letter-spacing: -.025em; color: #1d1442; text-wrap: balance; }
.parent__text { margin: 0; max-width: 62ch; font-size: 17px; line-height: 1.6; color: #3a2f63; }
.parent__key {
  /* ключевая мысль: спокойная подложка в палитре блока, без рамок и цветных полос */
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start;
  margin: 18px 0 4px; padding: 16px 18px; border-radius: var(--r-m); max-width: 62ch;
  background: #ebe4fb; color: #2d2257; font-size: 16px; font-weight: 500; line-height: 1.55;
}
.parent__key::before {
  content: ''; width: 22px; height: 22px; margin-top: 1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%236a4fd1' stroke-width='2'/%3E%3Cpath d='M12 11v6M12 7.5v.5' stroke='%236a4fd1' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.parent__label { margin: 18px 0 4px; font-weight: 700; font-size: 15px; color: #4b3489; }
.parent__next { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid rgba(75, 52, 137, .14); font-size: 14px; font-weight: 600; color: #5b4a96; }
.parent__next svg { flex: none; width: 18px; height: 18px; color: #7c5fd6; }

/* Форма */
.lead { margin-top: clamp(56px, 9vw, 88px); scroll-margin-top: 16px; outline: none; }
.lead__title { margin: 0; font-size: clamp(26px, 6vw, 36px); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; text-align: center; text-wrap: balance; }
.lead__subtitle { margin: 10px auto 10px; max-width: 52ch; text-align: center; color: var(--muted); font-size: 16px; line-height: 1.5; }
.lead__why { display: flex; justify-content: center; align-items: flex-start; gap: 8px; margin: 0 auto 20px; max-width: 56ch; text-align: left; font-size: 13px; color: var(--muted); line-height: 1.45; }
.lead__why svg { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--mint); }
.form { display: grid; gap: 16px; padding: 22px 18px; border-radius: var(--r-l); background: linear-gradient(180deg, #211651, #180f3d); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 30px 60px -40px rgba(0, 0, 0, .9); }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
.field label, .field legend { font-weight: 600; font-size: 14px; color: #e6defd; padding: 0; margin-bottom: 6px; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"] {
  width: 100%; height: 54px; padding: 0 16px; border-radius: var(--r-s);
  background: rgba(11, 8, 32, .65); border: 1px solid rgba(167, 139, 250, .28);
  color: var(--text); font: 500 16px var(--font); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input::placeholder { color: rgba(189, 179, 230, .5); font-weight: 400; }
.field input:focus { border-color: var(--pumpkin-hot); box-shadow: 0 0 0 4px rgba(255, 179, 71, .18); background: rgba(11, 8, 32, .9); }
.field.is-invalid input { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(255, 107, 107, .15); }
.field__error { margin: 0; min-height: 0; color: #ff9c9c; font-size: 13px; font-weight: 600; line-height: 1.35; }
.field__error:empty { display: none; }
.field__error--block { margin-top: -6px; }
.field__hint { margin: -6px 0 0; color: var(--muted); font-size: 13px; }
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chip {
  min-height: 52px; border-radius: var(--r-s); cursor: pointer; font: 700 16px var(--font); color: var(--text); font-variant-numeric: tabular-nums;
  background: rgba(11, 8, 32, .65); border: 1px solid rgba(167, 139, 250, .28);
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
  touch-action: manipulation;
}
.chip:hover { border-color: rgba(255, 179, 71, .6); }
.chip:active { transform: scale(.96); }
.chip[aria-checked="true"] { background: rgba(255, 138, 31, .2); border-color: var(--pumpkin-hot); color: #fff; box-shadow: 0 0 22px -8px rgba(255, 138, 31, .9); }
.field.is-invalid .chip { border-color: var(--danger); }

.consent { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; cursor: pointer; font-size: 14px; line-height: 1.45; color: #e6defd; padding: 4px 0; }
.consent input { position: absolute; opacity: 0; width: 28px; height: 28px; margin: 0; cursor: pointer; }
.consent__box {
  width: 28px; height: 28px; border-radius: 8px; border: 1.5px solid rgba(167, 139, 250, .6); background: rgba(11, 8, 32, .65);
  display: grid; place-items: center; transition: background .2s, border-color .2s;
}
.consent__box::after { content: ''; width: 12px; height: 7px; border-left: 3px solid #2a1204; border-bottom: 3px solid #2a1204; transform: rotate(-45deg) scale(0); margin-top: -3px; transition: transform .2s var(--ease-spring); }
.consent input:checked + .consent__box { background: var(--pumpkin); border-color: var(--pumpkin-hot); }
.consent input:checked + .consent__box::after { transform: rotate(-45deg) scale(1); }
.consent input:focus-visible + .consent__box { outline: 3px solid var(--glow); outline-offset: 3px; }
.consent a { color: var(--pumpkin-hot); font-weight: 600; text-underline-offset: 3px; }

.send-error { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px 12px; align-items: start; padding: 14px 16px; border-radius: var(--r-m); background: rgba(255, 140, 120, .12); }
.send-error::before { content: ''; width: 22px; height: 22px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23ffb3a3' stroke-width='2'/%3E%3Cpath d='M12 7v6M12 16.5v.5' stroke='%23ffb3a3' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.send-error p, .send-error .btn { grid-column: 2; justify-self: start; }
.send-error[hidden] { display: none; }
.send-error p { margin: 0; color: #ffd0d0; font-weight: 600; font-size: 14px; line-height: 1.45; }

.btn__spinner { display: none; width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(42, 18, 4, .3); border-top-color: #2a1204; animation: spin .8s linear infinite; }
.btn.is-loading .btn__spinner { display: inline-block; }
.btn.is-loading { pointer-events: none; animation: none; }
/* во время отправки кнопка остаётся яркой — это не «выключено», а «идёт отправка» */
.btn.is-loading:disabled { opacity: 1; filter: none; cursor: progress; }
.btn { user-select: none; -webkit-user-select: none; }
.nowrap { white-space: nowrap; font-weight: 600; }
.success__phone { color: var(--glow); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.success__phone:hover { color: #fff; }
/* пометка демо-версии: заметная, но спокойная; без неё демо легко принять за настоящую отправку */
.demo-note { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px; border-radius: var(--r-s); background: rgba(255, 210, 122, .12); color: #ffe2a8; font-size: 14px; font-weight: 600; line-height: 1.45; text-align: left; }
.demo-note::before { content: 'ДЕМО'; flex: none; padding: 2px 7px; border-radius: 5px; background: var(--glow); color: #2a1204; font-size: 11px; font-weight: 800; letter-spacing: .06em; line-height: 1.6; }
.demo-note--success { max-width: 46ch; margin: 0 auto 18px; }

/* Успех */
.success {
  margin-top: 30px; padding: 34px 22px; border-radius: var(--r-xl); text-align: center; outline: none;
  background: radial-gradient(80% 70% at 50% 0%, rgba(61, 220, 151, .2), transparent 70%), linear-gradient(180deg, #211651, #180f3d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 30px 70px -40px rgba(61, 220, 151, .7);
}
.success__star { width: 120px; margin: 0 auto 10px; animation: starIdle 3s ease-in-out infinite; }
.success__title { margin: 0 0 10px; font-family: var(--font-accent); font-size: clamp(26px, 6vw, 36px); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.success__text { margin: 0 auto 22px; max-width: 46ch; color: #f1ecff; font-size: 17px; line-height: 1.55; }
.success__steps-title { margin: 0 auto 12px; max-width: 46ch; text-align: left; font-size: 15px; font-weight: 700; color: var(--muted); }
.success__steps { margin: 0 auto 24px; padding: 0; max-width: 46ch; list-style: none; counter-reset: s; text-align: left; color: #e6defd; line-height: 1.5; }
.success__steps li { position: relative; padding-left: 36px; counter-increment: s; }
.success__steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(61, 220, 151, .18); color: var(--mint); font-size: 13px; font-weight: 700; }
.success__steps li + li { margin-top: 10px; }

.replay { display: block; margin: 26px auto 0; padding: 12px 18px; min-height: 44px; border: 0; background: none; color: var(--muted); font: 600 15px var(--font); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; cursor: pointer; }
.replay:hover { color: #fff; }

/* =========================================================
   ФУТЕР — как на coddyschool.com (цвета, шрифт и размеры взяты с сайта)
   Все классы с префиксом cf-, чтобы не пересекаться со стилями сайта.
   ========================================================= */
.cf {
  --cf-bg: #264655; --cf-bottom: #385d6f; --cf-muted: #96bed1;
  --cf-btn: #0095b6; --cf-btn-shadow: #00667c;
  background: var(--cf-bg); color: #fff;
  font: 400 15px/1.43 'Noto Sans', NotoSans, Arial, sans-serif;
}
.cf a { color: #fff; }
.cf p { margin: 0; }
.cf__wrap { width: min(1140px, 100%); margin: 0 auto; padding: 0 16px; }

.cf .cf__title { margin: 0 0 20px; padding: 0; border: 0; background: none; color: #fff; font: 700 17px/1.43 'Noto Sans', NotoSans, Arial, sans-serif; text-align: left; }
.cf__text { margin-bottom: 10px !important; }
.cf__link { display: table; margin-bottom: 10px; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .35); }
.cf__link:hover, .cf__dirlist a:hover, .cf__legal a:hover, .cf__official a:hover { color: var(--cf-muted); }
.cf__btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 20px;
  border-radius: 21px; background: var(--cf-btn); box-shadow: 0 4px 0 var(--cf-btn-shadow);
  font-size: 14px; font-weight: 700; line-height: 22px; text-decoration: none; white-space: nowrap;
  transition: transform .15s, box-shadow .15s;
}
.cf__btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--cf-btn-shadow); }
.cf__dirlist { list-style: none; margin: 0; padding: 0; }
.cf__dirlist li { margin-bottom: 10px; }
.cf__dirlist a { text-decoration: underline; }
.cf__toggle { display: inline-flex; align-items: center; gap: 8px; cursor: default; }
.cf__arrow { display: none; transition: transform .2s; }

/* Верх: 5 колонок */
.cf__top { display: flex; justify-content: space-between; gap: 24px; padding: 40px 0 30px; }
.cf__col { display: flex; flex-direction: column; }
.cf__blk--callbtn, .cf__blk--careerbtn { margin: 6px 0 22px; }
.cf .cf__blk--pr .cf__title, .cf .cf__blk--franchise .cf__title { margin-top: 24px; }

/* Соцсети */
.cf__social { display: flex; gap: 65px; padding: 30px 0; border-top: 1px solid rgba(255, 255, 255, .15); border-bottom: 1px solid rgba(255, 255, 255, .15); }
.cf__social-group { display: flex; gap: 15px; }
.cf__social a { display: block; width: 35px; height: 35px; transition: transform .15s; }
.cf__social a:hover { transform: translateY(-2px); }
.cf__social img { width: 35px; height: 35px; }

/* Юридический текст */
.cf__legal { padding-top: 40px; font-size: 14px; line-height: 20px; }
.cf__legal p { margin-bottom: 20px; }

/* Официальные ссылки */
.cf__official { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 60px; padding: 20px 0 30px; font-size: 14px; line-height: 20px; }
.cf__official-item { display: flex; align-items: center; gap: 30px; }
.cf__official-item img { flex: none; height: auto; }
.cf__official-item--top img { width: auto; height: 84px; }

/* Партнёры */
.cf__partners { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 40px 0 60px; border-top: 1px solid rgba(255, 255, 255, .15); }
.cf__partner img { height: auto; max-width: 100%; }
.cf__mob { display: none; }

/* Нижняя строка */
.cf__bottom { background: var(--cf-bottom); color: var(--cf-muted); font-size: 14px; line-height: 20px; }
.cf__bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; min-height: 104px; padding-top: 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.cf__menu { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; }
.cf__menu li + li::before { content: '/'; margin: 0 10px; }
.cf__bottom a { color: var(--cf-muted); text-decoration: none; border-bottom: 1px solid rgba(150, 190, 209, .45); }
.cf__bottom a:hover { color: #fff; }

/* Мобильная версия футера — как на сайте: две колонки, «Наши направления» раскрываются */
@media (max-width: 991px) {
  .cf__top { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; padding: 30px 0 20px;
    grid-template-areas: "phone callbtn" "hours email" "pr franchise" "career careerbtn" "dirs dirs"; }
  .cf__col { display: contents; }
  .cf__blk { margin: 0 0 24px; }
  .cf .cf__blk .cf__title { margin: 0 0 14px; }
  .cf__blk--phone { grid-area: phone; } .cf__blk--callbtn { grid-area: callbtn; }
  .cf__blk--hours { grid-area: hours; } .cf__blk--email { grid-area: email; }
  .cf__blk--pr { grid-area: pr; } .cf__blk--franchise { grid-area: franchise; }
  .cf__blk--career { grid-area: career; } .cf__blk--careerbtn { grid-area: careerbtn; }
  .cf__blk--dirs { grid-area: dirs; }
  .cf__blk--callbtn, .cf__blk--careerbtn { align-self: start; }
  .cf__blk--careerbtn { margin-top: 30px; }
  .cf__title, .cf__blk--pr .cf__title, .cf__blk--franchise .cf__title { font-size: 15px; }
  .cf__toggle { cursor: pointer; min-height: 44px; margin: -10px 0 0 !important; }
  .cf__arrow { display: block; }
  .cf__blk--dirs.is-open .cf__arrow { transform: rotate(180deg); }
  .cf__dirlist { display: none; }
  .cf__blk--dirs.is-open .cf__dirlist { display: block; }
  .cf__social { flex-wrap: wrap; gap: 12px 25px; padding: 20px 0; border-bottom: 0; }
  .cf__social-group { gap: 8px; }
  .cf__legal { padding-top: 10px; }
  .cf__official { flex-direction: column; align-items: flex-start; gap: 20px; }
  .cf__official-item { gap: 20px; }
  .cf__partners { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 20px; justify-items: start; border-top: 0; padding: 30px 0 40px; }
  .cf__partner--sk { order: 1; } .cf__partner--histes { order: 2; }
  .cf__partner--eu { order: 3; } .cf__partner--etw { order: 4; }
  .cf__partner--gm { order: 5; grid-column: 1 / -1; } .cf__partner--csta { order: 6; grid-column: 1 / -1; }
  .cf__desk { display: none; } .cf__mob { display: block; }
  .cf__bottom-inner { flex-direction: column; align-items: flex-start; min-height: 0; padding-top: 24px; }
  .cf__menu { flex-direction: column; gap: 8px; }
  .cf__menu li + li::before { content: none; }
}

/* =========================================================
   РАСКЛАДКИ
   ========================================================= */

/* Горизонтальный экран: текст слева, парящая мастерская справа (как в референсе) */
@media (min-aspect-ratio: 1/1) {
  .hero { height: 100vh; height: 100svh; min-height: 600px; }
  /* текст ~46%, сцена ~54%: заголовку хватает ширины, сцена остаётся главной */
  .hero__body {
    grid-template-columns: minmax(0, 11fr) minmax(0, 13fr);
    gap: clamp(24px, 4vw, 72px); align-items: center;
    padding-block: clamp(16px, 3vh, 40px) clamp(20px, 4vh, 48px);
  }
  .hero__text { max-width: 680px; }
  .stage-wrap { height: 100%; }
}
@media (min-aspect-ratio: 1/1) and (max-height: 700px) {
  .story { display: none; }
  .title { font-size: clamp(24px, 8.6cqi, 60px); }
  .steps { margin-bottom: 16px; }
}

/* Узкая текстовая колонка (ноутбук 1024): подсказка — только лампочка, в одну строку со счётчиком */
@container (max-width: 430px) {
  .hud { flex-wrap: nowrap; }
  .hint-btn { width: 48px; padding: 0; justify-content: center; flex: none; }
  .hint-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Шапка на планшете и телефоне: меню прячется, телефон — компактная кнопка */
@media (max-width: 1023px) {
  .site-nav { display: none; }
  .site-phone { margin-left: auto; }
}
@media (max-width: 639px) {
  .site-phone { width: 44px; padding: 0; justify-content: center; }
  .site-phone span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Вертикальный экран (телефон, планшет в портрете): своя композиция сцены */
@media (max-aspect-ratio: 1/1) {
  .hero { height: 100vh; height: 100svh; min-height: 560px; }
  .hero__body { grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
  .hero__text { position: static; padding-top: clamp(14px, 2.4vh, 28px); text-align: center; max-width: 560px; width: 100%; margin-inline: auto; }
  .eyebrow { display: none; }
  .title { font-size: clamp(26px, 9.3cqi, 56px); margin-bottom: clamp(10px, 1.6vh, 18px); }
  .story { display: none; }
  .steps { max-width: 420px; margin: 4px auto 0; gap: 12px; }
  .steps__item { gap: 2px; padding: 5px 4px; font-size: clamp(11.5px, 3.2vw, 14px); }
  .steps__item + .steps__item::before { left: -10px; font-size: 16px; }
  .steps__icon { font-size: 15px; }
  .steps__text { display: none; }
  .steps__short { display: inline; }
  .coach { gap: 10px; padding: 6px 14px 6px 6px; }
  .coach__icon { width: 36px; height: 36px; }
  .coach__text b { font-size: 16px; }
  .coach__text small { font-size: 12.5px; }
  .challenge { top: 64px; padding: 5px 14px 5px 9px; }
  .challenge b { font-size: 13.5px; }
  .timer__value { font-size: 17px; }
  .timer__msg { font-size: 13px; }
  .toast { font-size: 14px; }
  .hud { position: absolute; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom)); justify-content: center; z-index: 70; padding: 0 12px; flex-wrap: nowrap; }
  .counter { padding: 8px 14px 8px 10px; font-size: 15px; gap: 8px; }
  .counter__pips i { width: 11px; height: 10px; }
  .hint-btn { padding: 0 14px; }
  .stage-wrap { padding: 6px 0 76px; }
  .stage { width: min(100cqw, 100cqh * 3 / 5); aspect-ratio: 3 / 5; }
  .room--wide { display: none; }
  .room--tall { display: block; }
  .prop { left: var(--tx); top: var(--ty); width: var(--tw); z-index: var(--tz); }
  .pk, .hit { left: var(--tx); top: var(--ty); }
  .pk { width: var(--ts); z-index: var(--tz); }
  .mote { left: var(--tx); top: var(--ty); }
  .mote:nth-of-type(n+4) { display: none; } /* на телефоне меньше частиц */
  .pk--shade-w .pk__img:not(.pk__img--wink) { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
  .pk--shade-t .pk__img:not(.pk__img--wink) { filter: brightness(.5) saturate(.8) drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
  .hit { width: max(48px, calc(var(--ts) * 1.3)); }
  .sky__cloud--1 { width: 90vw; height: 26vw; }
  .modal { place-items: end center; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
}
@media (max-width: 430px) {
  /* на телефоне подсказка — только лампочка; подпись остаётся для экранного чтеца */
  .hint-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hint-btn { width: 48px; padding: 0; justify-content: center; }
  .modal__options { gap: 10px; }
  .modal__card { padding: 20px 14px 16px; }
  .option { min-height: 150px; padding: 10px 8px 14px; font-size: 15px; }
  .option__stage { width: 78px; height: 78px; }
  .option__icon { width: 70px; height: 70px; }
}
@media (min-width: 600px) {
  .final__inner { padding-top: 44px; }
  .parent { padding: 34px 36px 28px; }
  .trial__main { padding: 32px; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .form { padding: 28px; }
}
@media (min-width: 600px) and (max-width: 819px) {
  /* планшет: подарок — горизонтальной карточкой, без пустоты */
  .gift { display: grid; grid-template-columns: 190px minmax(0, 1fr); column-gap: 20px; align-items: center; text-align: left; }
  .gift__visual { grid-row: 1 / 4; margin: 0; }
  .gift__badge { justify-self: start; }
  .gift__text { margin: 0; }
}
@media (min-width: 820px) {
  /* курсы — одним рядом, сколько бы их ни было (2 или 3) */
  .course-list { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  /* интересы и шкалы — рядом; пробное занятие и подарок — рядом; у родителей иллюстрация справа */
  .r-interests__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; align-items: start; margin-top: 8px; }
  .trial__grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: stretch; }
  .trial__cta { width: auto; }
  .gift { display: flex; flex-direction: column; justify-content: center; align-items: center; }
  .parent { grid-template-columns: minmax(0, 1fr) 200px; column-gap: 32px; padding: 40px 44px 32px; }
  .parent__body { grid-column: 1; grid-row: 1; }
  .parent__art { grid-column: 2; grid-row: 1; align-self: start; width: 200px; height: 180px; margin: 0; }
  .parent__monster { width: 140px; }
  .parent { scroll-margin-top: 24px; }
  .parent__next { grid-column: 1 / -1; }
  .form { padding: 32px; }
}

/* Футер на самых узких телефонах: все 8 иконок соцсетей в одну строку */
@media (max-width: 380px) {
  .cf__social { gap: 12px 14px; }
  .cf__social-group { gap: 6px; }
  .cf__social a, .cf__social img { width: 32px; height: 32px; }
}

/* =========================================================
   УМЕНЬШЕНИЕ ДВИЖЕНИЯ: анимации упрощаются, игра остаётся играбельной
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .bat, .mote, .ov-star, .ov-bat { display: none; }
  .challenge { animation: none; }
  .stage { transform: none; }
  .pk.is-hint .pk__ring { opacity: 1; transform: scale(1.2); }
  .pk.is-hint .pk__img--wink { opacity: 1; }
}
