:root {
  --blush: #ffe4ef;
  --pink: #ff6fb5;
  --pink-2: #ff9ccd;
  --pink-soft: #ffd3e8;
  --lime: #c9f23d;
  --green: #34c924;
  --green-soft: #8fe86a;
  --sage: #9bbf6e;
  --cream: #fff8f0;
  --ink: #1b1b1f;
  --violet: #9d5cff;
  --blue: #4d9dff;
  --orange: #ff8a3d;
  --yellow: #ffcf2e;
  --red: #ff5a7a;

  --accent: var(--lime);
  --radius: 28px;

  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-hand: "Caveat", "Comic Sans MS", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--blush);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- фон ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--blush) url("assets/bg.svg") center / cover no-repeat;
}
@media (max-aspect-ratio: 4/5) {
  .bg { background-image: url("assets/bg-mobile.svg"); }
}

/* ---------- экраны ---------- */
.screen {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  animation: screenIn .55s cubic-bezier(.2, .8, .2, 1);
}
.screen--top { justify-content: flex-start; padding-top: 24px; padding-bottom: 56px; }

@keyframes screenIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.wrap { width: 100%; max-width: 780px; }
.wrap--wide { max-width: 920px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--pink);
  font-family: var(--f-body);
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
  text-transform: lowercase;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, background-color .2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
.btn:active { transform: translateY(6px); box-shadow: 0 0 0 var(--ink); }

.btn--big {
  font-family: var(--f-display);
  font-size: clamp(20px, 2.3vw, 28px);
  min-height: 80px;
  padding: 0 48px;
  background: var(--lime);
}
.btn--big:hover { background: #d8ff5a; }
.btn--ghost { background: var(--cream); }
.btn--ghost:hover { background: #fff; }

/* ---------- лендинг ---------- */
.landing { overflow: hidden; padding-bottom: 110px; }

.hero {
  position: relative;
  max-width: 900px;
  text-align: center;
  padding: 24px 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 0 4px 0 var(--ink);
  font-weight: 800;
  font-size: 15px;
  rotate: -3deg;
}

.hero__title {
  margin: 28px 0 22px;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(42px, 8.6vw, 116px);
  line-height: .98;
  letter-spacing: -.035em;
  text-transform: uppercase;
  text-wrap: balance;
}
.hl {
  position: relative;
  display: inline-block;
  padding: 0 .2em;
  color: var(--pink);
  text-shadow: .045em .045em 0 var(--ink);
}
.hl::after {
  content: "";
  position: absolute;
  inset: -.04em -.02em .02em;
  border: clamp(3px, .45vw, 6px) solid var(--blue);
  border-radius: 999px;
  rotate: -3deg;
  pointer-events: none;
}

.hero__lead {
  max-width: 600px;
  margin: 0 auto 34px;
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.5;
  font-weight: 500;
  text-wrap: pretty;
}

.nudge { display: inline-block; animation: nudge 4s ease-in-out infinite; }
@keyframes nudge {
  0%, 84%, 100% { rotate: 0deg; }
  88% { rotate: -3deg; }
  92% { rotate: 3deg; }
  96% { rotate: -1.5deg; }
}

.hero__note {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  margin: 18px 0 0;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: 26px;
  rotate: -2deg;
}
.hero__note svg { width: 46px; height: 32px; translate: 0 -10px; }

/* стикеры */
.stickers { position: absolute; inset: 0; pointer-events: none; }
.sticker {
  position: absolute;
  animation: float 5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

.sticker--bulb { width: 120px; top: -18px; right: -30px; rotate: 14deg; animation-delay: -1s; }
.sticker--67 {
  left: -40px;
  bottom: 60px;
  width: 116px;
  height: 116px;
  display: grid;
  grid-auto-flow: column;
  place-content: center;
  gap: 2px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 5px 0 var(--ink);
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 42px;
  rotate: -12deg;
  animation-delay: -2.5s;
}
.sticker--67 span:first-child { translate: 0 -6px; }
.sticker--67 span:last-child { translate: 0 6px; }

.pill {
  padding: 8px 18px;
  border: 3px solid currentColor;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  white-space: nowrap;
}
.pill--blue   { color: var(--blue);   top: 36px;  left: -10px; rotate: -8deg; animation-delay: -.5s; }
.pill--violet { color: var(--violet); bottom: 30px; right: -40px; rotate: 6deg; animation-delay: -3s; }
.pill--orange { color: var(--orange); top: 46%; right: -120px; rotate: -4deg; animation-delay: -4s; }

/* бегущая строка */
.marquee {
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: 28px;
  overflow: hidden;
  border-block: 3px solid var(--ink);
  background: var(--lime);
  rotate: -2deg;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee__track span {
  padding: 12px 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 20px;
  text-transform: uppercase;
  white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- шапка и прогресс ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.logo {
  padding: 8px 14px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: -.02em;
}
.logo span { color: var(--pink); }

.counter {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 20px;
}
.counter b {
  font-size: 40px;
  color: var(--pink);
  text-shadow: 2px 2px 0 var(--ink);
}

.progress {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 44px;
}
.progress i {
  height: 14px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  transition: background-color .3s ease;
}
.progress i.is-current { background: var(--yellow); }
.progress i.is-ok { background: var(--green-soft); }
.progress i.is-bad { background: var(--red); }

/* ---------- карточка ---------- */
.card {
  position: relative;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--ink);
  padding: clamp(22px, 4vw, 40px);
}

.quiz-card { padding-top: clamp(48px, 6vw, 60px); }
.quiz-card.is-in { animation: cardIn .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes cardIn {
  from { opacity: 0; transform: translateX(40px) rotate(1.5deg); }
  to   { opacity: 1; transform: none; }
}

.word-sticker {
  position: absolute;
  top: -34px;
  left: clamp(16px, 3vw, 28px);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 32px);
  padding: 8px 22px 8px 10px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: var(--accent);
  box-shadow: 0 5px 0 var(--ink);
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(24px, 4.6vw, 42px);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -.03em;
  rotate: -2deg;
}
.word-sticker__emoji {
  display: grid;
  place-items: center;
  width: 1.45em;
  height: 1.45em;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  font-size: .95em;
  line-height: 1;
}

.situation {
  margin: 0 0 22px;
  padding: 16px 20px;
  border: 2.5px dashed rgba(27, 27, 31, .45);
  border-radius: 20px 20px 20px 6px;
  background: #fff;
}
.situation__label {
  display: block;
  margin-bottom: 2px;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: 24px;
  color: var(--pink);
}
.situation p {
  margin: 0;
  font-size: clamp(16px, 1.9vw, 19px);
  line-height: 1.5;
  text-wrap: pretty;
}

.question {
  margin: 0 0 20px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(20px, 2.8vw, 28px);
  line-height: 1.2;
  letter-spacing: -.02em;
  outline: none;
}

/* варианты */
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 76px;
  padding: 14px 16px;
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 5px 0 var(--ink);
  text-align: left;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.35;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .2s ease, opacity .2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
@media (hover: hover) {
  .option:hover:not(:disabled) { background: var(--pink-soft); transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
}
.option:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 0 0 var(--ink); }
.option:disabled { cursor: default; }

.option__key {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--accent);
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 15px;
}

.option.is-correct { background: var(--green-soft); }
.option.is-correct .option__key { background: #fff; }
.option.is-wrong { background: var(--red); animation: shake .4s ease; }
.option.is-wrong .option__key { background: #fff; }
.option.is-dim { opacity: .45; }

@keyframes shake {
  20% { translate: -8px 0; }
  40% { translate: 7px 0; }
  60% { translate: -5px 0; }
  80% { translate: 3px 0; }
}

/* разбор ответа */
.feedback {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px 24px;
  margin-top: 24px;
  padding: 18px 22px;
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: #fff;
  animation: pop .4s cubic-bezier(.2, 1.4, .4, 1);
  scroll-margin-bottom: 24px;
}
.feedback.is-ok { background: #eaffd9; }
.feedback.is-bad { background: #ffe3ea; }
@keyframes pop {
  from { opacity: 0; transform: scale(.94) translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.feedback__verdict {
  margin-bottom: 4px;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: -.02em;
}
.feedback__text {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.5;
  text-wrap: pretty;
}

/* ---------- результат ---------- */
.result {
  margin-top: 70px;
  padding-top: 96px;
  text-align: center;
}

.badge {
  position: absolute;
  top: -74px;
  left: 50%;
  width: 156px;
  height: 156px;
  translate: -50% 0;
  display: grid;
  place-items: center;
}
.badge svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 18s linear infinite;
}
.badge polygon { fill: var(--accent); stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; }
.badge__emoji { position: relative; font-size: 64px; line-height: 1; animation: pop .6s .2s both cubic-bezier(.2, 1.6, .4, 1); }
@keyframes spin { to { rotate: 360deg; } }

.result__score {
  display: inline-block;
  margin: 0 0 8px;
  padding: 6px 16px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font-weight: 800;
  font-size: 16px;
}
.result__score b { font-family: var(--f-display); font-size: 20px; color: var(--pink); }

.result__pre {
  margin: 6px 0 0;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 36px);
  rotate: -2deg;
}
.result__title {
  margin: 0 0 18px;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(34px, 8vw, 84px);
  line-height: .98;
  letter-spacing: -.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  outline: none;
}
.result__title span {
  color: var(--pink);
  text-shadow: .04em .04em 0 var(--ink);
}
.result__text {
  max-width: 620px;
  margin: 0 auto 30px;
  font-size: clamp(16px, 1.9vw, 19px);
  line-height: 1.55;
  text-wrap: pretty;
}

.scale {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 30px;
  padding: 18px 0 0;
  list-style: none;
}
.scale li {
  position: relative;
  padding: 9px 16px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  font-size: 15px;
  opacity: .55;
}
.scale li.is-you {
  opacity: 1;
  background: var(--accent);
  box-shadow: 0 4px 0 var(--ink);
  rotate: -3deg;
}
.scale li.is-you::before {
  content: "ты тут";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  translate: -50% 0;
  font-family: var(--f-hand);
  font-size: 22px;
  color: var(--pink);
  white-space: nowrap;
}

.result__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* блок про Telegram */
.tg {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px 40px;
  margin-top: 36px;
  padding: clamp(26px, 4.5vw, 52px);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background-color: var(--blue);
  background-image: radial-gradient(rgba(255, 255, 255, .28) 2px, transparent 2.5px);
  background-size: 22px 22px;
  box-shadow: 8px 8px 0 var(--ink);
  overflow: hidden;
}
.tg__chip {
  display: inline-block;
  padding: 7px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--pink);
  box-shadow: 0 3px 0 var(--ink);
  font-weight: 800;
  font-size: 14px;
  rotate: -3deg;
}
.tg__title {
  margin: 20px 0 10px;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(28px, 4.8vw, 54px);
  line-height: 1;
  letter-spacing: -.035em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: .05em .05em 0 var(--ink);
  text-wrap: balance;
}
.tg__text {
  margin: 0 0 28px;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.05;
  rotate: -1.5deg;
}
.btn--tg {
  min-height: 70px;
  padding: 0 34px;
  background: var(--lime);
  font-family: var(--f-display);
  font-size: clamp(17px, 2vw, 22px);
  text-transform: none;
  text-decoration: none;
  color: var(--ink);
}
.btn--tg:hover { background: #d8ff5a; }
.btn--tg svg { width: 1.2em; height: 1.2em; }
.tg__plane {
  width: clamp(150px, 20vw, 230px);
  rotate: -6deg;
  animation: float 5s ease-in-out infinite;
}

/* шпаргалка */
.glossary { margin-top: 36px; }
.glossary__title {
  margin: 0 0 20px;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(22px, 3vw, 30px);
  text-transform: uppercase;
  letter-spacing: -.03em;
}
.glossary__title span {
  display: inline-block;
  margin-left: 6px;
  font-family: var(--f-hand);
  font-weight: 700;
  font-size: .95em;
  text-transform: none;
  letter-spacing: 0;
  color: var(--pink);
  rotate: -2deg;
}
.glossary__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.glossary__item {
  position: relative;
  padding: 16px 16px 18px;
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  background: #fff;
}
.glossary__word {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 12px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--item-accent, var(--lime));
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 15px;
  text-transform: uppercase;
}
.glossary__meaning { margin: 0; font-size: 15px; line-height: 1.45; }
.glossary__mark {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  font-weight: 900;
  font-size: 14px;
}
.glossary__mark.is-ok { background: var(--green-soft); }
.glossary__mark.is-bad { background: var(--red); }

/* ---------- конфетти и тост ---------- */
.confetti { position: fixed; inset: 0; z-index: 50; overflow: hidden; pointer-events: none; }
.confetti i {
  position: absolute;
  top: -40px;
  font-style: normal;
  animation-name: fall;
  animation-timing-function: cubic-bezier(.3, .1, .6, 1);
  animation-fill-mode: forwards;
}
.confetti .bit { width: 10px; height: 16px; border-radius: 3px; border: 1.5px solid var(--ink); }
.confetti .bit--1 { width: 13px; height: 13px; border-radius: 50%; }
.confetti .bit--2 { width: 18px; height: 7px; }
.confetti .glyph { font-size: 30px; }
@keyframes fall {
  to { transform: translate(var(--dx), 112vh) rotate(var(--rot)); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  translate: -50% 0;
  margin: 0;
  padding: 14px 22px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 0 5px 0 var(--ink);
  font-weight: 800;
  white-space: nowrap;
  animation: pop .35s cubic-bezier(.2, 1.4, .4, 1);
}

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .pill--orange { display: none; }
  .sticker--bulb { right: 0; }
  .sticker--67 { left: 0; }
  .pill--violet { right: 0; }
}

@media (max-width: 760px) {
  .glossary__list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .screen { padding: 20px 16px; }
  .screen--top { padding-top: 16px; padding-bottom: 40px; }
  .landing { padding-bottom: 96px; }

  .hero { padding: 84px 0 12px; }
  .sticker--bulb { width: 70px; top: -4px; right: 8px; }
  .sticker--67 { width: 66px; height: 66px; font-size: 24px; left: 8px; top: 0; bottom: auto; }
  .pill--blue, .pill--violet { display: none; }

  .hero__title { margin-top: 24px; }
  .hero__lead { margin-bottom: 28px; }
  .btn--big { width: 100%; min-height: 72px; padding: 0 24px; }
  .nudge { display: block; }
  .hero__note { font-size: 23px; }

  .marquee { bottom: 20px; }
  .marquee__track span { font-size: 16px; padding: 10px 0; }

  .progress { gap: 6px; margin-bottom: 40px; }
  .counter b { font-size: 32px; }
  .logo { font-size: 13px; padding: 7px 12px; }

  .card { border-radius: 24px; box-shadow: 5px 5px 0 var(--ink); }
  .quiz-card { padding: 46px 16px 18px; }
  .word-sticker { top: -28px; padding: 6px 16px 6px 8px; gap: 10px; }
  .situation { padding: 12px 14px; }
  .options { grid-template-columns: 1fr; gap: 12px; }
  .option { min-height: 64px; font-size: 15.5px; }

  .feedback { grid-template-columns: 1fr; padding: 16px; }
  .feedback .btn { width: 100%; }

  .result { padding: 88px 18px 24px; margin-top: 64px; }
  .badge { width: 132px; height: 132px; top: -62px; }
  .badge__emoji { font-size: 54px; }
  .scale { gap: 30px 8px; }
  .scale li { padding: 7px 12px; font-size: 13.5px; }
  .result__actions .btn { width: 100%; }

  .tg { grid-template-columns: 1fr; padding: 24px 18px; border-radius: 24px; box-shadow: 5px 5px 0 var(--ink); }
  .tg__plane { position: absolute; top: 8px; right: 6px; width: 84px; }
  .tg__title { margin-top: 26px; }
  .btn--tg { width: 100%; padding: 0 16px; }

  .glossary { padding: 20px 16px; }
  .glossary__list { grid-template-columns: 1fr; }

  .result__actions .btn, .btn--tg { white-space: normal; text-align: center; line-height: 1.2; padding-block: 12px; }
}

@media (max-width: 380px) {
  .tg__plane { width: 60px; top: 6px; right: 4px; }
  .tg__chip { font-size: 12px; padding: 6px 11px; }
  .tg__title { margin-top: 22px; }
}

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