/* rex-poses.css — позы Рекса (rex-poses.js): на 2,5 секунды картинка позы
   вместо Рекса по частям. Картинка позы того же кадра, что и Рекс, — ложится
   ровно на его место; появляется за 180 мс (без движения — только
   проявляется). Голос, бег и смех в углу важнее позы: при них поза прячется. */

.dr-pose, .rex-pose { display: none; }

/* Угол (dino.js): поза — внутри .dr-flip, поворачивается вместе с Рексом. */
.dr.is-posing:not(.is-speaking):not(.is-running):not(.is-laughing) .dr-flip { position: relative; }
.dr.is-posing:not(.is-speaking):not(.is-running):not(.is-laughing) .dr-flip > .dr-art { visibility: hidden; }
.dr.is-posing:not(.is-speaking):not(.is-running):not(.is-laughing) .dr-pose {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  transform-origin: 50% 92%; animation: rex-pose-in .18s ease-out both;
  -webkit-user-drag: none; user-select: none; pointer-events: none;
}

/* Игра (#rex-pic): поза — поверх Рекса, того же размера, что .rex-art у
   ступени (rex-game.css), по низу картинки, как осколки скорлупы. */
#rex-pic.is-posing > .rex-art { visibility: hidden; }
#rex-pic.is-posing > .rex-pose {
  display: block; position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; width: 100%; height: auto; aspect-ratio: 1;
  transform-origin: 50% 92%; animation: rex-pose-in .18s ease-out both;
  -webkit-user-drag: none; user-select: none; pointer-events: none;
}
#rex-pic.rex-lvl-baby > .rex-pose { width: 60%; }
#rex-pic.rex-lvl-school > .rex-pose { width: 68%; }
#rex-pic.rex-lvl-pawn > .rex-pose { width: 75%; }
#rex-pic.rex-lvl-knight > .rex-pose { width: 81%; }
#rex-pic.rex-lvl-officer > .rex-pose { width: 86%; }
#rex-pic.rex-lvl-rook > .rex-pose { width: 91%; }
#rex-pic.rex-lvl-queen > .rex-pose { width: 96%; }

@keyframes rex-pose-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes rex-pose-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .dr.is-posing .dr-pose, #rex-pic.is-posing > .rex-pose { animation: rex-pose-fade .18s linear both; }
}
