/* ───────────── Tokens ───────────── */
:root {
  --ivory: #FAF9F5;
  --paper: #F0EEE6;
  --cloud: #E8E6DC;
  --line: #D9D6CA;
  --slate: #141413;
  --slate-2: #3D3D3A;
  --muted: #55544F;
  --clay: #D97757;
  --clay-dk: #C6613F;
  --clay-lt: #F4D9CC;
  --kraft: #D4A27F;
  --manilla: #EBDBBC;
  --olive: #6E8B4E;
  --olive-lt: #DCE6CF;
  --sky: #6A9BCC;
  --sky-lt: #D7E5F2;
  --red: #C2463C;
  --red-lt: #F5D6D2;
  --white: #FFFFFF;

  --bg: var(--ivory);
  --fg: var(--slate);
  --fg-2: var(--slate-2);
  --fg-muted: var(--muted);
  --card: var(--white);
  --card-2: var(--paper);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --r-lg: 32px;
  --r-md: 22px;
  --sh-1: 0 1px 2px rgba(20,20,19,.05), 0 8px 24px rgba(20,20,19,.06);
  --sh-2: 0 2px 4px rgba(20,20,19,.06), 0 24px 60px rgba(20,20,19,.12);
}
body.dark {
  --bg: var(--slate);
  --fg: var(--ivory);
  --fg-2: #D8D6CE;
  --fg-muted: #A3A19A;
  --card: #22221F;
  --card-2: #2B2B27;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .6s var(--ease), color .6s var(--ease);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
img { display: block; }

/* ───────────── Stage (1600×900, масштабируется под экран) ───────────── */
#viewport { position: fixed; inset: 0; overflow: hidden; touch-action: none; }
#stage {
  position: absolute; left: 0; top: 0;
  width: 1600px; height: 900px;
  transform-origin: 0 0;
}
.slide {
  position: absolute; inset: 0;
  padding: 84px 104px 120px;
  opacity: 0; visibility: hidden;
  transform: translateY(24px);
  transition: opacity .55s var(--ease), transform .7s var(--ease), visibility 0s linear .55s;
}
.slide.active { opacity: 1; visibility: visible; transform: none; transition: opacity .55s var(--ease) .1s, transform .7s var(--ease) .1s, visibility 0s; }
.slide.past { transform: translateY(-24px); }

/* Steps (появляются по клику) */
[data-step] { opacity: 0; transform: translateY(18px) scale(.98); transition: opacity .5s var(--ease), transform .6s var(--spring); pointer-events: none; }
[data-step].shown { opacity: 1; transform: none; pointer-events: auto; }

/* ───────────── Typography ───────────── */
.kicker {
  font: 700 22px/1 "Sans"; letter-spacing: .14em; text-transform: uppercase;
  color: var(--clay-dk); display: flex; align-items: center; gap: 14px; margin-bottom: 26px;
}
.kicker::before { content: ""; width: 12px; height: 12px; background: var(--clay); }
h1, h2, h3, .serif { font-family: "Serif", Georgia, serif; font-weight: 500; letter-spacing: -.02em; }
h1 { font-size: 112px; line-height: 1.02; }
h2 { font-size: 76px; line-height: 1.06; margin-bottom: 22px; }
h3 { font-size: 40px; line-height: 1.15; }
em { font-style: italic; color: var(--clay-dk); }
body.dark em, body.dark .kicker { color: var(--clay); }
.lead { font-size: 32px; line-height: 1.4; color: var(--fg-2); max-width: 900px; }
.sub { font-size: 30px; line-height: 1.4; color: var(--fg-2); }
mark { background: linear-gradient(transparent 58%, var(--clay-lt) 58%); color: inherit; padding: 0 .08em; }
body.dark mark { background: linear-gradient(transparent 58%, rgba(217,119,87,.45) 58%); }
.center { text-align: center; }

/* ───────────── Chrome: шапка, прогресс, кнопки ───────────── */
.brand {
  position: fixed; top: 22px; left: 28px; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  font: 700 17px/1 "Sans"; letter-spacing: .02em; color: var(--fg-muted);
  pointer-events: none; transition: color .6s;
}
.brand svg { width: 34px; height: auto; }
.progress { position: fixed; left: 0; right: 0; bottom: 0; height: 6px; background: transparent; z-index: 50; }
.progress i { display: block; height: 100%; width: 0; background: var(--clay); transition: width .6s var(--ease); }
.nav {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  display: flex; align-items: center; gap: 12px;
}
.nav .count { font: 600 18px/1 "Sans"; color: var(--fg-muted); margin-right: 8px; font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }
.nav button {
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); color: var(--fg);
  box-shadow: var(--sh-1); border: 1px solid var(--line);
  transition: transform .2s var(--spring), background .3s, border-color .3s;
}
body.dark .nav button { border-color: #3A3A35; }
.nav button:active { transform: scale(.92); }
.nav button.primary { background: var(--clay); color: var(--white); border-color: var(--clay); width: 96px; height: 96px; }
.nav button.small { width: 56px; height: 56px; }
.nav svg { width: 30px; height: 30px; }
.nav button.small svg { width: 24px; height: 24px; }
.nav button.off { opacity: .5; }

/* ───────────── Обзор слайдов ───────────── */
#overview {
  position: fixed; inset: 0; z-index: 80; background: rgba(20,20,19,.72);
  backdrop-filter: blur(8px); display: none; padding: 60px; overflow: auto;
}
#overview.open { display: block; }
#overview .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; max-width: 1400px; margin: 0 auto; }
#overview button {
  background: var(--ivory); color: var(--slate); border-radius: 18px; padding: 22px 20px; text-align: left;
  font: 600 19px/1.3 "Sans"; min-height: 110px; display: flex; flex-direction: column; gap: 10px;
}
#overview button b { font: 500 34px/1 "Serif"; color: var(--clay); }
#overview button.cur { outline: 4px solid var(--clay); }

/* ───────────── Клодик ───────────── */
#crab {
  position: absolute; left: 0; top: 0; z-index: 30;
  width: var(--s, 200px);
  transition: transform 1.1s var(--ease), width 1.1s var(--ease), opacity .5s;
  pointer-events: none;
}
#crab .crab-inner { position: relative; animation: bob 2.6s ease-in-out infinite; }
#crab svg.crab-svg { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 10px 14px rgba(20,20,19,.12)); }
#crab .shadow { position: absolute; left: 12%; right: 12%; bottom: -6%; height: 9%; border-radius: 50%; background: rgba(20,20,19,.12); filter: blur(3px); animation: shadow 2.6s ease-in-out infinite; }
body.dark #crab .shadow { background: rgba(0,0,0,.45); }
#crab.flip svg.crab-svg { transform: scaleX(-1); }
#crab.hidden { opacity: 0; }

/* выражения лица */
.crab-svg .eyes { display: none; }
#crab[data-mood="normal"] .eyes.normal,
#crab[data-mood="happy"] .eyes.happy,
#crab[data-mood="think"] .eyes.think,
#crab[data-mood="oops"] .eyes.wide,
#crab[data-mood="wow"] .eyes.wide,
#crab[data-mood="love"] .eyes.love,
#crab[data-mood="proud"] .eyes.happy,
.mini-crab .eyes.normal { display: inline; }
.crab-svg .eyes.normal, .crab-svg .eyes.think { animation: blink 4.5s infinite; transform-origin: 50% 30%; transform-box: fill-box; }

@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3.5%); } }
@keyframes shadow { 0%,100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.88); opacity: .7; } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

/* ходьба: ножки по очереди */
.crab-svg .leg { transform-box: fill-box; transform-origin: 50% 0; }
#crab.walking .crab-inner { animation: bob .32s ease-in-out infinite; }
#crab.walking .leg.a { animation: legA .32s steps(2) infinite; }
#crab.walking .leg.b { animation: legB .32s steps(2) infinite; }
@keyframes legA { 0% { transform: translateY(0); } 50% { transform: translateY(-.6px); } }
@keyframes legB { 0% { transform: translateY(-.6px); } 50% { transform: translateY(0); } }

/* машет лапкой */
.crab-svg .arm { transform-box: fill-box; }
.crab-svg .arm.r { transform-origin: 0% 50%; }
.crab-svg .arm.l { transform-origin: 100% 50%; }
#crab.wave .arm.r { animation: wave .7s ease-in-out infinite; }
@keyframes wave { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-40deg) translateY(-.6px); } }
#crab[data-mood="proud"] .arm.r, #crab[data-mood="love"] .arm.r { transform: rotate(-35deg) translateY(-.5px); }
#crab[data-mood="proud"] .arm.l, #crab[data-mood="love"] .arm.l { transform: rotate(35deg) translateY(-.5px); }

#crab.jump .crab-inner { animation: jump .7s var(--ease-out) 2; }
@keyframes jump { 0%,100% { transform: translateY(0) scale(1); } 15% { transform: translateY(4%) scale(1.06, .92); } 45% { transform: translateY(-26%) scale(.96, 1.05); } 75% { transform: translateY(0) scale(1.05, .95); } }
#crab.shake .crab-inner { animation: shake .5s ease-in-out 2; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5%) rotate(-4deg); } 75% { transform: translateX(5%) rotate(4deg); } }
#crab.dance .crab-inner { animation: dance 1s ease-in-out infinite; }
@keyframes dance { 0%,100% { transform: rotate(-7deg) translateY(0); } 25% { transform: rotate(0) translateY(-12%); } 50% { transform: rotate(7deg) translateY(0); } 75% { transform: rotate(0) translateY(-12%); } }

/* эффекты над головой */
#crab .fx { position: absolute; left: 50%; top: -34%; transform: translateX(-50%); font: 700 calc(var(--s, 200px) * .3)/1 "Serif"; transition: left .4s, top .4s; color: var(--clay); white-space: nowrap; }
#crab .fx span { display: inline-block; animation: pop .5s var(--spring) both, float 2.4s ease-in-out .5s infinite; }
@keyframes pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* облачко речи */
#crab .bubble {
  position: absolute; z-index: 2;
  background: var(--white); color: var(--slate);
  border-radius: 26px; padding: 20px 28px;
  font: 700 32px/1.25 "Sans"; letter-spacing: -.005em;
  box-shadow: var(--sh-2);
  width: max-content; max-width: 460px;
  translate: calc(var(--cx, 0%) + var(--dx, 0px)) 0;
  opacity: 0; transform: scale(.6); transition: opacity .3s var(--ease), transform .45s var(--spring);
}
#crab .bubble.on { opacity: 1; transform: scale(1); }
#crab .bubble::after { content: ""; position: absolute; width: 26px; height: 26px; background: var(--white); transform: rotate(45deg); border-radius: 4px; }
#crab .bubble.top { --cx: -50%; left: 50%; bottom: calc(100% + 34px); transform-origin: 50% 100%; }
#crab .bubble.top::after { left: clamp(20px, calc(50% - 13px - var(--dx, 0px)), calc(100% - 46px)); bottom: -9px; }
#crab .bubble.left { right: calc(100% + 26px); top: 0; transform-origin: 100% 40%; }
#crab .bubble.left::after { right: -9px; top: 32px; }
#crab .bubble.right { left: calc(100% + 26px); top: 0; transform-origin: 0 40%; }
#crab .bubble.right::after { left: -9px; top: 32px; }
#crab .bubble.big { font-size: 36px; max-width: 560px; }
#crab .bubble .caret { display: inline-block; width: 3px; height: 1em; background: var(--clay); vertical-align: -3px; margin-left: 3px; animation: caret .8s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* ───────────── Общие компоненты ───────────── */
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: 0 1px 2px rgba(20,20,19,.04); border: 1px solid var(--line); }
body.dark .card { border-color: #33332F; }
.pill {
  display: inline-flex; align-items: center; gap: 14px; padding: 18px 30px; border-radius: 999px;
  background: var(--clay); color: var(--white); font: 700 30px/1 "Sans";
}
.pill.soft { background: var(--clay-lt); color: var(--clay-dk); }
.pill svg { width: 34px; height: 34px; }
.photo { border-radius: var(--r-md); overflow: hidden; background: var(--cloud); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.tag {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; font: 800 22px/1 "Sans"; letter-spacing: .02em; color: var(--white);
}
.tag.cat { background: var(--olive); }
.tag.not { background: var(--red); }
.tag.clay { background: var(--clay); }
.tag.dark { background: var(--slate); }
.bigbtn {
  min-width: 300px; height: 112px; padding: 0 44px; border-radius: 999px;
  font: 800 40px/1 "Sans"; color: var(--white);
  display: inline-flex; align-items: center; justify-content: center; gap: 18px;
  box-shadow: 0 6px 0 rgba(20,20,19,.18), var(--sh-1);
  transition: transform .15s var(--spring), box-shadow .15s, opacity .3s;
}
.bigbtn:active { transform: translateY(5px); box-shadow: 0 1px 0 rgba(20,20,19,.18); }
.bigbtn.cat { background: var(--olive); }
.bigbtn.not { background: var(--red); }
.bigbtn.ghost { background: var(--card); color: var(--fg); border: 2px solid var(--line); }
.bigbtn svg { width: 44px; height: 44px; }
.bigbtn[disabled] { opacity: .35; pointer-events: none; }

.pixel-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(var(--cloud) 1.6px, transparent 1.7px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 75% 55%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 75% 55%, #000 0%, transparent 70%);
}
body.dark .pixel-bg { background-image: radial-gradient(#2E2E2A 1.6px, transparent 1.7px); }

/* ───────────── Слайд: обложка ───────────── */
.hero { position: absolute; left: 104px; top: 150px; width: 820px; }
.hero h1 em { display: block; }
.hero .lead { margin-top: 36px; max-width: 700px; }
.hero .hint { position: absolute; left: 0; top: 640px; display: flex; gap: 14px; align-items: center; font: 600 20px/1 "Sans"; color: var(--fg-muted); white-space: nowrap; }
.hero .hint kbd { font: 700 17px/1 "Sans"; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--card); color: var(--fg-2); }

/* ───────────── Слайд: обо мне ───────────── */
.about { display: grid; grid-template-columns: 470px 1fr; gap: 90px; align-items: start; margin-top: 70px; }
.polaroid { background: var(--white); padding: 18px 18px 74px; border-radius: 10px; box-shadow: var(--sh-2); transform: rotate(-3deg); position: relative; }
.polaroid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.polaroid figcaption { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; font: italic 500 32px/1 "Serif"; color: var(--slate-2); }
.about h2 { font-size: 84px; margin-bottom: 14px; }
.about .role { font-size: 30px; line-height: 1.4; color: var(--fg-2); margin-bottom: 44px; }
.about .role b { color: var(--fg); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.fact { padding: 28px 28px 30px; }
.fact b { display: block; font: 500 72px/1 "Serif"; color: var(--clay); margin-bottom: 14px; letter-spacing: -.03em; }
.fact span { font-size: 25px; line-height: 1.35; color: var(--fg-2); display: block; }

/* ───────────── Вопрос большой ───────────── */
.question { position: absolute; left: 104px; top: 170px; width: 1100px; }
.question h1 { font-size: 104px; }
.question .pill { margin-top: 56px; }
.question .pill svg { width: 42px; height: 42px; }

/* версии детей (стикеры) */
.stickies { position: absolute; left: 104px; right: 470px; top: 360px; height: 420px; }
.sticky {
  position: absolute; width: 270px; padding: 30px 26px; border-radius: 6px;
  font: 600 30px/1.2 "Serif"; color: var(--slate); box-shadow: 0 2px 2px rgba(20,20,19,.06), 0 14px 30px rgba(20,20,19,.10);
}
.sticky.y { background: #F6E3A9; } .sticky.o { background: var(--clay-lt); } .sticky.g { background: var(--olive-lt); } .sticky.b { background: var(--sky-lt); } .sticky.k { background: var(--manilla); }

/* ───────────── Определение ───────────── */
.define { margin-top: 10px; max-width: 1180px; }
.define .statement { font: 500 66px/1.15 "Serif"; letter-spacing: -.02em; margin-bottom: 52px; }
.abilities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1150px; }
.ability { padding: 30px; display: flex; gap: 22px; align-items: flex-start; }
.ability .ic { flex: none; width: 72px; height: 72px; border-radius: 20px; background: var(--clay-lt); color: var(--clay-dk); display: grid; place-items: center; }
.ability .ic svg { width: 40px; height: 40px; }
.ability h3 { font-size: 34px; margin-bottom: 8px; }
.ability p { font-size: 25px; line-height: 1.35; color: var(--fg-muted); }
.note-line { margin-top: 40px; font-size: 26px; color: var(--fg-muted); display: flex; align-items: center; gap: 14px; }

/* ───────────── Флип-карточки ───────────── */
.flips { display: grid; grid-template-columns: repeat(3, 360px); gap: 26px; margin-top: 30px; }
.flip { height: 226px; perspective: 1400px; cursor: pointer; }
.flip .in { position: relative; width: 100%; height: 100%; transition: transform .8s var(--spring); transform-style: preserve-3d; }
.flip.open .in { transform: rotateY(180deg); }
.flip .face { position: absolute; inset: 0; border-radius: var(--r-md); backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.flip .front { background: var(--card); box-shadow: var(--sh-1); padding: 24px 26px; display: flex; flex-direction: column; justify-content: space-between; border: 1.5px solid var(--line); }
.flip .front .q { font: 700 22px/1 "Sans"; color: var(--clay); letter-spacing: .1em; text-transform: uppercase; }
.flip .front p { font: 500 31px/1.16 "Serif"; color: var(--fg); }
.flip .front .tap { font: 700 22px/1 "Sans"; color: var(--clay-dk); display: flex; align-items: center; gap: 10px; }
.flip .front .tap svg { width: 34px; height: 34px; animation: tapme 1.6s ease-in-out infinite; }
.flip .back { transform: rotateY(180deg); background: var(--slate); box-shadow: var(--sh-2); }
.flip .back img, .flip .back .illu { width: 100%; height: 100%; object-fit: cover; }
.flip .back .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 50px 22px 18px; background: linear-gradient(transparent, rgba(20,20,19,.85)); color: var(--white); font: 700 28px/1.1 "Sans"; }
.illu { display: grid; place-items: center; background: var(--paper); color: var(--slate); }

/* правда/выдумка */
.truths { display: grid; grid-template-columns: repeat(2, 540px); gap: 24px; margin-top: 30px; }
.truth { position: relative; height: 210px; padding: 30px 36px; display: flex; flex-direction: column; justify-content: center; gap: 12px; cursor: pointer; overflow: hidden; border: 1.5px solid var(--line); transition: background .4s, border-color .4s; }
.truth p { font: 500 38px/1.12 "Serif"; padding-right: 160px; }
.truth .verdict { position: absolute; right: 30px; top: 50%; translate: 0 -50%; transform: scale(0) rotate(-20deg); transition: transform .5s var(--spring); }
.truth.open .verdict { transform: scale(1) rotate(-8deg); }
.truth .verdict span { display: block; font: 800 22px/1 "Sans"; letter-spacing: .06em; text-transform: uppercase; padding: 14px 18px; border-radius: 14px; border: 4px solid currentColor; }
.truth.yes .verdict { color: var(--olive); } .truth.no .verdict { color: var(--red); }
.truth.open.yes { background: #F1F5EB; border-color: var(--olive-lt); }
.truth.open.no { background: #FBEEEC; border-color: var(--red-lt); }
.truth small { padding-right: 160px; font-size: 22px; line-height: 1.3; color: var(--fg-2); color: var(--fg-muted); opacity: 0; transition: opacity .4s .2s; }
.truth.open small { opacity: 1; }
.thumbs { display: flex; gap: 26px; margin-top: 30px; font-size: 24px; color: var(--fg-muted); align-items: center; }
.thumbs span { display: inline-flex; align-items: center; gap: 10px; }

/* ───────────── Переход (тёмный) ───────────── */
.big-statement { position: absolute; left: 104px; top: 200px; width: 1100px; }
.big-statement h1 { font-size: 96px; line-height: 1.08; }
.big-statement h1 + h1 { margin-top: 26px; }

/* ───────────── Правила ───────────── */
.chips { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 40px; max-width: 900px; }
.chip { padding: 22px 34px; border-radius: 999px; background: var(--card); border: 2px solid var(--line); font: 700 36px/1 "Sans"; box-shadow: var(--sh-1); display: inline-flex; align-items: center; gap: 14px; }
.chip i { width: 18px; height: 18px; background: var(--clay); display: inline-block; }

.rulecheck { display: grid; grid-template-columns: 600px 1fr; gap: 60px; margin-top: 6px; align-items: center; }
.rulecheck .photo { height: 420px; }
.checks { list-style: none; display: grid; gap: 14px; }
.checks li { display: flex; align-items: center; gap: 20px; font: 700 38px/1 "Sans"; opacity: 0; transform: translateX(-20px); }
.slide.active .checks li { animation: in-left .5s var(--ease-out) forwards; }
.slide.active .checks li:nth-child(1) { animation-delay: .6s; } .slide.active .checks li:nth-child(2) { animation-delay: 1.1s; }
.slide.active .checks li:nth-child(3) { animation-delay: 1.6s; } .slide.active .checks li:nth-child(4) { animation-delay: 2.1s; }
.slide.active .checks li:nth-child(5) { animation-delay: 2.6s; }
@keyframes in-left { to { opacity: 1; transform: none; } }
.checks li b { width: 56px; height: 56px; border-radius: 50%; background: var(--olive); color: #fff; display: grid; place-items: center; }
.checks li b svg { width: 32px; height: 32px; }
.banner { position: absolute; left: 104px; right: 104px; bottom: 140px; padding: 30px 40px; border-radius: var(--r-md); background: var(--slate); color: var(--ivory); font: 500 40px/1.2 "Serif"; display: flex; align-items: center; gap: 24px; }
body.dark .banner { background: var(--ivory); color: var(--slate); }
.banner .dot { flex: none; width: 20px; height: 20px; background: var(--clay); }

.gestures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px; margin-top: 40px; }
.gesture { height: 480px; border-radius: var(--r-lg); color: var(--white); padding: 44px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden; }
.gesture.cat { background: var(--olive); } .gesture.not { background: var(--red); }
.gesture .art { position: absolute; top: 30px; right: 30px; width: 120px; height: 120px; opacity: .95; }
.gesture h3 { font: 800 92px/1 "Sans"; letter-spacing: -.02em; margin-bottom: 18px; }
.gesture p { font: 600 32px/1.3 "Sans"; opacity: .95; }

/* ───────────── Обучение ───────────── */
.train { position: absolute; left: 104px; top: 236px; right: 104px; bottom: 120px; }
.train .stagebox { position: absolute; left: 0; top: 0; width: 640px; height: 520px; }
.train .stagebox .photo { position: absolute; inset: 0; box-shadow: var(--sh-2); transition: transform .8s var(--ease), opacity .6s; }
.train .stagebox .photo.leave { transform: translate(760px, 160px) scale(.2); opacity: 0; }
.train .stagebox .photo.enter { animation: enter .7s var(--spring); }
@keyframes enter { from { transform: scale(.8) rotate(-3deg); opacity: 0; } }
.train .counter { position: absolute; left: 24px; top: 24px; z-index: 2; }
.train .btns { position: absolute; left: 680px; top: 120px; display: flex; flex-direction: column; gap: 26px; }
.train .btns .bigbtn { min-width: 290px; }
.tray { position: absolute; right: 0; top: 200px; width: 410px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tray .slot { height: 150px; border-radius: 18px; border: 2.5px dashed var(--line); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 8px; }
.tray .slot img { position: absolute; left: 6px; right: 6px; top: 6px; width: calc(100% - 12px); height: 96px; object-fit: cover; border-radius: 12px; }
.tray .slot.filled { border-style: solid; border-color: transparent; background: var(--card); box-shadow: var(--sh-1); animation: pop .5s var(--spring); }
.tray .slot .tag { font-size: 15px; padding: 7px 10px; }
.tray-label { position: absolute; right: 0; width: 410px; top: 166px; font: 700 20px/1 "Sans"; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-muted); }

/* ───────────── Экзамен ───────────── */
.exam .stagebox { position: absolute; left: 104px; top: 236px; width: 760px; height: 500px; }
.exam .stagebox .photo { position: absolute; inset: 0; box-shadow: var(--sh-2); }
.exam .btns { position: absolute; left: 924px; top: 520px; display: flex; gap: 22px; }
.stamp {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 3;
  font: 800 92px/1 "Sans"; letter-spacing: .04em; text-transform: uppercase;
  padding: 18px 34px; border: 10px solid currentColor; border-radius: 26px; background: rgba(255,255,255,.88);
  transform: scale(2.4) rotate(-14deg); opacity: 0; transition: transform .45s var(--spring), opacity .2s;
}
.stamp.on { transform: scale(1) rotate(-10deg); opacity: 1; }
.stamp.bad { color: var(--red); } .stamp.good { color: var(--olive); }

/* ───────────── Почему ошибся ───────────── */
.why { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; margin-top: 34px; max-width: 1150px; }
.why .cell { position: relative; transition: transform .5s var(--spring), opacity .5s, filter .5s; }
.why .cell .photo { height: 180px; }
.why .cell .tag { position: absolute; left: 10px; bottom: 10px; font-size: 16px; padding: 8px 12px; }
.why.focus-cats .cell:not(.c) , .why.focus-black .cell:not(.k) { opacity: .25; filter: grayscale(1); }
.why.focus-cats .cell.c, .why.focus-black .cell.k { transform: translateY(-12px) scale(1.04); }
.why .cell .photo { outline: 0 solid var(--clay); transition: outline-width .3s; }
.why.focus-cats .cell.c .photo, .why.focus-black .cell.k .photo { outline-width: 6px; }
.why-notes { display: flex; gap: 22px; margin-top: 34px; }
.why-notes .pill { font-size: 28px; }

/* ───────────── Доучиваем ───────────── */
.teach { display: grid; grid-template-columns: repeat(3, 330px); grid-auto-rows: 250px; gap: 22px; margin-top: 26px; }
.teach .tile { position: relative; cursor: pointer; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh-1); transition: transform .3s var(--spring); }
.teach .tile:active { transform: scale(.97); }
.teach .tile img { width: 100%; height: 100%; object-fit: cover; }
.teach .tile .tag { position: absolute; left: 14px; bottom: 14px; transform: scale(0); transition: transform .45s var(--spring); }
.teach .tile.done .tag { transform: scale(1); }
.teach .tile .hand { position: absolute; right: 14px; top: 14px; width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--clay); transition: opacity .3s; }
.teach .tile .hand svg { width: 30px; height: 30px; }
.teach .tile.done .hand { opacity: 0; }
.teach .tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0 var(--olive); transition: box-shadow .3s; }
.teach .tile.done::after { box-shadow: inset 0 0 0 6px var(--olive); }
.teach .tile.done.n::after { box-shadow: inset 0 0 0 6px var(--red); }

/* ───────────── Пересдача ───────────── */
.retest { display: grid; grid-template-columns: repeat(2, 520px); gap: 30px; margin-top: 30px; }
.retest .q { position: relative; }
.retest .photo { height: 400px; }
.retest .answer { margin-top: 20px; height: 70px; display: flex; align-items: center; gap: 14px; font: 700 32px/1 "Sans"; opacity: 0; transform: translateY(10px); transition: all .5s var(--spring); }
.retest .answer.on { opacity: 1; transform: none; }
.retest .answer .ok { width: 56px; height: 56px; border-radius: 50%; background: var(--olive); color: #fff; display: grid; place-items: center; }
.retest .answer .ok svg { width: 32px; height: 32px; }

/* ───────────── Чихуахуа или кекс ───────────── */
.chimuf { display: grid; grid-template-columns: repeat(4, 214px); grid-auto-rows: 214px; gap: 20px; margin-top: 28px; }
.cm { position: relative; border-radius: 22px; overflow: hidden; cursor: pointer; box-shadow: var(--sh-1); }
.cm img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.cm:active img { transform: scale(.97); }
.cm .lab { position: absolute; inset: auto 0 0 0; padding: 14px; text-align: center; font: 800 28px/1 "Sans"; color: #fff; transform: translateY(100%); transition: transform .45s var(--spring); }
.cm.open .lab { transform: none; }
.cm.dog .lab { background: var(--sky); } .cm.muf .lab { background: var(--clay); }
.cm .num { position: absolute; left: 12px; top: 12px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--slate); font: 800 22px/44px "Sans"; text-align: center; }

/* ───────────── Итог ───────────── */
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 40px; }
.sum { padding: 40px 36px; min-height: 430px; display: flex; flex-direction: column; }
.sum .n { font: 500 96px/1 "Serif"; color: var(--clay); margin-bottom: 28px; }
.sum h3 { font-size: 46px; margin-bottom: 18px; }
.sum p { font-size: 26px; line-height: 1.35; color: var(--fg-muted); margin-top: auto; }

/* ───────────── Видео ───────────── */
.video-wrap { position: absolute; left: 104px; top: 330px; width: 880px; height: 495px; border-radius: var(--r-lg); overflow: hidden; background: #000; box-shadow: var(--sh-2); }
.video-wrap video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-missing { position: absolute; inset: 0; display: none; place-items: center; text-align: center; background: var(--card-2); color: var(--fg); padding: 40px; }
.video-missing.on { display: grid; }
.video-missing h3 { font-size: 64px; margin-bottom: 16px; }
.video-missing p { font-size: 22px; color: var(--fg-muted); }
.video-missing code { font: 600 20px/1 ui-monospace, monospace; background: var(--bg); padding: 6px 10px; border-radius: 8px; }
.playbig { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 150px; height: 150px; border-radius: 50%; background: var(--clay); color: #fff; display: grid; place-items: center; box-shadow: var(--sh-2); transition: transform .2s var(--spring), opacity .3s; }
.playbig svg { width: 64px; height: 64px; margin-left: 8px; }
.playbig.hide { opacity: 0; pointer-events: none; transform: scale(.7); }

/* ───────────── Финал ───────────── */
.finale { position: absolute; left: 104px; top: 170px; width: 900px; }
.finale h1 { font-size: 120px; }
.finale .lead { margin-top: 34px; font-size: 36px; }
.parade { position: absolute; left: 0; right: 0; bottom: 150px; height: 90px; overflow: hidden; pointer-events: none; }
.mini-crab { position: absolute; bottom: 0; width: 90px; left: -120px; }
.slide.active .mini-crab { animation: walk-across linear infinite; }
.mini-crab svg { width: 100%; height: auto; animation: bob .32s ease-in-out infinite; }
@keyframes walk-across { from { transform: translateX(0); } to { transform: translateX(1840px); } }

/* ───────────── Источники ───────────── */
.credits { columns: 2; column-gap: 60px; font-size: 17px; line-height: 1.55; color: var(--fg-muted); margin-top: 20px; }
.credits li { list-style: none; break-inside: avoid; }

/* ───────────── Конфетти ───────────── */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
#crab .bubble.narrow { max-width: 360px; }
.gestures { max-width: 1080px; }
.define .statement { max-width: 1100px; }

/* ───────────── Анимации появления ───────────── */
.slide.active .anim { animation: rise .8s var(--ease-out) both; animation-delay: calc(var(--d, 0) * 90ms + 150ms); }
@keyframes rise { from { opacity: 0; translate: 0 34px; } to { opacity: 1; translate: 0 0; } }
.slide.active .anim.zoom { animation-name: zoomin; }
@keyframes zoomin { from { opacity: 0; scale: .9; } to { opacity: 1; scale: 1; } }
.slide.active h1 em, .slide.active h2 em { display: inline-block; animation: wiggle 1s var(--spring) both; animation-delay: .7s; }
.hero h1 em { display: block !important; }
@keyframes wiggle { 0% { rotate: -4deg; scale: .9; opacity: 0; } 60% { rotate: 2deg; scale: 1.04; opacity: 1; } 100% { rotate: 0; scale: 1; } }
.floaters { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.floaters i { position: absolute; display: block; background: var(--clay); opacity: .0; animation: drift linear infinite; }
.slide.active .floaters i { opacity: var(--o, .5); }
body.dark .slide.active .floaters i { opacity: calc(var(--o, .5) * 1.8); }
@keyframes drift { from { transform: translateY(0) rotate(0); } to { transform: translateY(-1100px) rotate(180deg); } }
.photo img { transition: scale 6s ease-out; }
.slide.active .rulecheck .photo img, .slide.active .lion-card img { scale: 1.06; }
.pill { animation: none; }
.slide.active .pill[data-step].shown { animation: pulse 2.4s ease-in-out 1s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(217,119,87,.45); } 50% { box-shadow: 0 0 0 18px rgba(217,119,87,0); } }
.bigbtn:not([disabled]) { animation: breathe 2.8s ease-in-out infinite; }
.bigbtn.not:not([disabled]) { animation-delay: 1.4s; }
@keyframes breathe { 0%,100% { scale: 1; } 50% { scale: 1.035; } }
.teach .tile.next .hand { animation: tapme 1.6s ease-in-out infinite; }
@keyframes tapme { 0%,100% { scale: 1; } 50% { scale: 1.15; } }

/* ───────────── Правки после ревью ───────────── */
#crab svg.crab-svg { pointer-events: auto; cursor: pointer; }
#crab:has(.bubble.top.on) .fx { left: 104%; top: -16%; }
#crab.glitch .crab-inner { animation: glitch .9s steps(2) 1; }
@keyframes glitch {
  0% { transform: translate(0); filter: none; }
  10% { transform: translate(-6%, 2%) skewX(12deg); filter: drop-shadow(6px 0 0 #6A9BCC) drop-shadow(-6px 0 0 #C2463C); }
  25% { transform: translate(5%, -3%) skewX(-10deg); filter: hue-rotate(90deg) drop-shadow(-5px 0 0 #6A9BCC); }
  40% { transform: translate(-3%, 0) scaleY(.85); filter: drop-shadow(4px 0 0 #C2463C); opacity: .6; }
  55% { transform: translate(4%, 2%) skewX(8deg); filter: invert(.15) drop-shadow(-6px 0 0 #6A9BCC); opacity: 1; }
  70% { transform: translate(-2%, -2%); filter: none; }
  100% { transform: translate(0); filter: none; }
}
.chips { gap: 20px; }
.chip { min-width: 160px; justify-content: center; cursor: pointer; position: relative; }
.chip .w { display: none; align-items: center; gap: 14px; }
.chip .q { color: var(--clay-dk); font: 500 44px/1 "Serif"; }
.chip.open { background: var(--clay-lt); border-color: var(--clay); animation: pop .45s var(--spring); }
.chip.open .w { display: inline-flex; } .chip.open .q { display: none; }
.chip:not(.open) { border-style: dashed; border-color: var(--clay); }
.tapnote { margin-top: 26px; }
.silence { margin-top: 26px; max-width: 1080px; display: flex; align-items: center; gap: 22px; padding: 22px 30px; border-radius: var(--r-md); background: var(--paper); font-size: 30px; color: var(--fg); }
.silence b { font-weight: 800; }
.claws { display: inline-flex; gap: 10px; }
.claws i { width: 34px; height: 34px; background: var(--clay); display: block; animation: claws 1.4s ease-in-out infinite; }
.claws i + i { animation-delay: .2s; }
@keyframes claws { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.thumbs span svg { width: 34px; height: 34px; }
.thumbs .up { color: var(--olive); font-weight: 700; } .thumbs .dn { color: var(--red); font-weight: 700; }
.thumbs { font-size: 26px; }
.done-card { position: absolute; inset: 0; border-radius: var(--r-md); background: var(--olive); color: #fff; display: grid; place-content: center; text-align: center; gap: 12px; animation: pop .6s var(--spring); }
.done-card b { font: 500 120px/1 "Serif"; }
.done-card span { font: 700 34px/1.2 "Sans"; }
.stamp:not(.bad):not(.good) { color: var(--olive); }
.blank { display: inline-block; min-width: 170px; border-bottom: 4px dashed var(--clay); line-height: 1.1; }
.blank [data-step] { color: var(--clay-dk); font-style: italic; }
.blank:has(.shown) { border-bottom-color: transparent; }

/* ───────────── Правки v3 ───────────── */
.fact b.ic-fact { width: 72px; height: 72px; }
.fact b.ic-fact svg { width: 72px; height: 72px; }
.fact b[data-to] { font-size: 56px; }
.hushhand { width: 56px; height: 56px; border-radius: 50%; background: var(--clay); color: #fff; display: grid; place-items: center; flex: none; }
.hushhand svg { width: 32px; height: 32px; animation: claws 1.4s ease-in-out infinite; }
.answer-reveal { position: absolute; left: 104px; top: 132px; }
.slide:has(.answer-reveal.shown) .guess { visibility: hidden; }
.flip .back .illu svg { display: block; }
.ov-credits { display: block; text-align: center; margin: 28px auto 0; color: var(--ivory); font: 600 18px/1 "Sans"; opacity: .8; }
.flip .back:has(.illu) { background: var(--paper); }
.flip .back .illu { position: absolute; left: 0; right: 0; top: 0; bottom: 50px; height: auto; }
.flip .back:has(.illu) .cap { background: var(--clay); padding: 12px 20px; height: 50px; display: flex; align-items: center; }
.fact b.crabfact { width: 96px; height: 60px; } .fact b.crabfact svg { width: 96px; height: 60px; }
.abilities.six { gap: 18px; }
.abilities.six .ability { padding: 32px 28px; gap: 20px; align-items: center; }
.abilities.six .ability .ic { width: 78px; height: 78px; border-radius: 22px; }
.abilities.six .ability .ic svg { width: 44px; height: 44px; }
.abilities.six .ability h3 { font-size: 38px; margin-bottom: 6px; }
.abilities.six .ability p { font-size: 24px; }
.define .statement { margin-bottom: 36px; }
.abilities.six + .note-line { margin-top: 28px; }
.abilities.six + .note-line { font-size: 28px; }
