.card__wrap .card__header {
  min-height: 55px;
}
.card__header .card__title {
  padding-bottom: 5px;
}
.you-win.you-win-show {
  top: 52px;
}
@media screen and (min-width: 436px) {
  .you-win.you-win-show {
    height: 54px;
  }
}

.cutting-the-shape .card__img-wrapper {
  position: relative;
}

.cutting-the-shape {
  position: relative;
}
.text-confirm-answer {
  font-size: 15px;
  font-weight: 400;
  color: grey;
  position: absolute;
  top: 0;
  left: 20px;
  width: 29%;
  transform: translate(0, 50%);
  opacity: 1;
  transition: all 250ms ease 0s;
  z-index: 9;
}

.text-confirm-answer.transparent {
  opacity: 0;
  transition: all 250ms;
}
.cutting-the-shape .card__text {
  margin-bottom: 30px;
  text-align: start;
  width: 88%;
}
.cutting-the-shape .card__img {
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}
.card__img .cutting-the-shape-outline {
  width: 100%;
  height: 102.3vw;
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  margin-top: 20px;
}
@media screen and (min-width: 436px) {
  .card__img .cutting-the-shape-outline {
    height: 338px;
    margin-top: unset;
  }
}
.cutting-the-shape-layer-1 {
  pointer-events: none;
}

.grid-draw-container {
  display: none;
}

.grid-draw-container.show {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1.5fr 0 1.5fr 0 1.5fr 0 1.5fr 0 1.5fr 0 1.5fr 0 1.5fr 0
    1.5fr;
  grid-template-columns: repeat(8, 1.5fr);
  gap: 0;
  margin-top: 20px;
}
@media screen and (min-width: 436px) {
  .grid-draw-container.show {
    margin-top: unset;
  }
}

.draw-cell {
  border: 0.5px solid white;
  width: 9vw;
  height: 9vw;
  margin: 0;
  padding: 0;
  background-color: #ffc00c;
}
@media screen and (min-width: 436px) {
  .draw-cell {
    width: 30px;
    height: 30px;
  }
}

.clickable {
  cursor: pointer;
}

.button.selected .button-border {
  display: block;
}

.buttons {
  margin-top: 63px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  opacity: 0;
}
.buttons.show {
  opacity: 1;
}
@media screen and (min-width: 436px) {
  .buttons {
    margin-top: 30px;
  }
}

.button {
  position: relative;
  width: 9vw;
  height: 9vw;
  margin: 10px;
  display: inline-block;
  cursor: pointer;
}

@media screen and (min-width: 436px) {
  .button {
    width: 30px;
    height: 30px;
  }
}
.button-border {
  width: calc(100% + 18px);
  height: calc(100% + 18px);
  position: absolute;
  top: -9px;
  left: -9px;
  border-radius: 5px;
  pointer-events: none;
  display: none;
}

.red-button {
  background-color: #e60000;
}

.red-button.selected .button-border {
  border: 3px solid #e60000;
}

.yellow-button {
  background-color: #ffc00c;
}

.yellow-button.selected .button-border {
  border: 3px solid #ffc00c;
}

.red {
  background-color: #e60000;
}

.yellow {
  background-color: #ffc00c;
}
.card__wrap-blocked .cutting-the-shape-layer-2 {
  display: flex;
  position: absolute;
  top: 0;
  opacity: 0;
}
.card__wrap-blocked .cutting-the-shape-layer-2.show {
  opacity: 1;
}
.card__wrap-blocked .cutting-the-shape-layer-1,
.card__wrap-blocked .buttons,
.card__wrap-blocked .cutting-the-shape-outline,
.card__wrap-blocked .grid-draw-container {
  opacity: 0;
}
/* =================== */
.card__img .card__img-wrapper .fig-top-red,
.card__img .card__img-wrapper .fig-top-yellow,
.card__img .card__img-wrapper .fig-bottom-red,
.card__img .card__img-wrapper .fig-bottom-yellow {
  width: 100%;
  height: 102.3vw;
  position: absolute;
  top: 0;
}
@media screen and (min-width: 436px) {
  .card__img .card__img-wrapper .fig-top-red,
  .card__img .card__img-wrapper .fig-top-yellow,
  .card__img .card__img-wrapper .fig-bottom-red,
  .card__img .card__img-wrapper .fig-bottom-yellow {
    height: 338px;
  }
}
.plug {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: all;
}
.card__wrap-blocked .bookmark-switch-text {
  pointer-events: none;
}
.card__wrap-blocked .bookmark-switch-text.bookmark-active {
  pointer-events: all;
}
.card__wrap-blocked .buttons.showing {
  animation: hideElement 0s linear 3s forwards;
}

@keyframes hideElement {
  to {
    visibility: hidden;
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
  }
}
/* ============ animations =========== */
/* Анимация для класса first-figure */
.fig-top-red.show-animation,
.fig-top-yellow.show-animation {
  display: flex;
  animation: moveUpFirstFigure 700ms forwards,
    moveLeftFirstFigure 500ms 700ms forwards,
    rotateFirstFigure 700ms 1400ms forwards;
}

/* Определение ключевых кадров анимации для first-figure */
@keyframes moveUpFirstFigure {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(0, -4.5vw);
    /* transform: translate(0, -22.5vw); */
  }
}
@keyframes moveLeftFirstFigure {
  0% {
    transform: translate(0, -4.5vw);
  }
  100% {
    transform: translate(-13vw, -4.5vw);
    /* transform: translate(-13vw, -22.5vw); */
  }
}

@keyframes rotateFirstFigure {
  0% {
    transform: translate(-13vw, -4.5vw) rotate(0deg);
  }
  75% {
    transform: translate(-13vw, -4.5vw) rotate(90deg);
  }
  100% {
    transform: translate(-13vw, -27vw) rotate(90deg);
  }
}

/* Анимация для класса second-figure */
.fig-bottom-red.show-animation,
.fig-bottom-yellow.show-animation {
  display: flex;
  animation: moveDownSecondFigure 700ms forwards,
    moveUpSecondFigure 700ms 2000ms forwards;
}

/* Определение ключевых кадров анимации для second-figure */
@keyframes moveDownSecondFigure {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(0, 17vw);
  }
}

@keyframes moveUpSecondFigure {
  0% {
    transform: translate(0, 17vw);
  }
  100% {
    transform: translate(0, -14vw);
  }
}

@media screen and (min-width: 436px) {
  /* Анимация для класса first-figure */
  .fig-top-red.show-animation,
  .fig-top-yellow.show-animation {
    display: flex;
    animation: moveUpFirstFigure 700ms forwards,
      moveLeftFirstFigure 500ms 700ms forwards,
      rotateFirstFigure 700ms 1400ms forwards;
  }

  /* Определение ключевых кадров анимации для first-figure */
  @keyframes moveUpFirstFigure {
    0% {
      transform: translate(0, 0);
    }
    100% {
      transform: translate(0, -40px);
    }
  }
  @keyframes moveLeftFirstFigure {
    0% {
      transform: translate(0, -40px);
    }
    100% {
      transform: translate(-44px, -40px);
    }
  }

  @keyframes rotateFirstFigure {
    0% {
      transform: translate(-44px, -40px) rotate(0deg);
    }
    75% {
      transform: translate(-44px, -40px) rotate(90deg);
    }
    100% {
      transform: translate(-44px, -99px) rotate(90deg);
    }
  }

  /* Анимация для класса second-figure */
  .fig-bottom-red.show-animation,
  .fig-bottom-yellow.show-animation {
    display: flex;
    animation: moveDownSecondFigure 700ms forwards,
      moveUpSecondFigure 700ms 2000ms forwards;
  }

  /* Определение ключевых кадров анимации для second-figure */
  @keyframes moveDownSecondFigure {
    0% {
      transform: translate(0, 0);
    }
    100% {
      transform: translate(0, 60px);
    }
  }

  @keyframes moveUpSecondFigure {
    0% {
      transform: translate(0, 60px);
    }
    100% {
      transform: translate(0, -55px);
    }
  }
}
