:root {
  --robot-ink: #24345b;
  --robot-blue: #2588ff;
  --robot-blue-light: #70c7ff;
  --robot-blue-shadow: #1768c5;
  --robot-orange: #ff9d24;
  --robot-yellow: #ffd34f;
  --robot-orange-shadow: #e77c12;
  --robot-mint: #52e0c0;
}

.game-container { display: grid; gap: 20px; }
.robot-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.robot {
  min-width: 0;
  padding: 16px 12px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
}
.robot[hidden] { display: none; }
.robot__art { position: relative; width: 190px; height: 250px; margin: 0 auto 5px; animation: robot-idle 3.2s ease-in-out infinite; }
.robot--helper .robot__art { animation-delay: -.8s; }
.robot__head { position: absolute; z-index: 1; top: 28px; left: 20px; width: 150px; height: 116px; border: 4px solid #f7f9fc; border-radius: 0; background: linear-gradient(145deg, var(--robot-blue-light), var(--robot-blue)); box-shadow: 0 4px 0 var(--robot-blue-shadow), 0 9px 18px #294c7b20; }
.robot--helper .robot__head { border-radius: 0; background: linear-gradient(145deg, #ffe16c, var(--robot-orange)); box-shadow: 0 4px 0 var(--robot-orange-shadow), 0 9px 18px #80531b18; }
.robot__antenna { position: absolute; top: 3px; left: 91px; width: 9px; height: 25px; border-radius: 9px; background: #536b9c; }
.robot__antenna::before { position: absolute; top: -9px; left: -3px; width: 15px; height: 15px; border: 2px solid #f7f9fc; border-radius: 50%; background: var(--robot-mint); content: ""; }
.robot__ear { position: absolute; z-index: 0; top: 74px; width: 17px; height: 34px; border: 3px solid #f7f9fc; border-radius: 0; background: var(--robot-mint); }
.robot__ear--left { left: 8px; }
.robot__ear--right { right: 8px; }
.robot__face { position: absolute; inset: 0; }
.robot__eye { position: absolute; top: 39px; width: 15px; height: 20px; border-radius: 50%; background: #fff; box-shadow: inset 0 -2px 0 #e1e8f1; }
.robot__eye::after { position: absolute; top: 6px; left: 5px; width: 6px; height: 8px; border-radius: 50%; background: var(--robot-ink); content: ""; }
.robot__eye:first-child { left: 37px; }
.robot__eye:nth-child(2) { right: 37px; }
.robot__mouth { position: absolute; top: 74px; left: 62px; width: 26px; height: 13px; border-bottom: 3px solid var(--robot-ink); border-radius: 0 0 20px 20px; }
.robot__body { position: absolute; top: 153px; left: 39px; width: 112px; height: 82px; border: 4px solid #f7f9fc; border-radius: 0; background: linear-gradient(145deg, #7dd7ff, #2386ef); box-shadow: 0 4px 0 var(--robot-blue-shadow); }
.robot--helper .robot__body { background: linear-gradient(145deg, #ffca55, #ff8b24); box-shadow: 0 4px 0 var(--robot-orange-shadow); }
.robot__arm { position: absolute; z-index: 2; top: 166px; width: 21px; height: 54px; border: 3px solid #f7f9fc; border-radius: 10px; background: var(--robot-mint); transform-origin: 50% 8px; }
.robot__arm--left { left: 35px; transform: rotate(12deg); }
.robot__arm--right { right: 35px; transform: rotate(-12deg); }
.robot__hand { position: absolute; bottom: -8px; left: 50%; width: 22px; height: 16px; border: 3px solid #f7f9fc; border-radius: 0; background: #ff78b7; transform: translateX(-50%); }
.robot__foot { position: absolute; top: 228px; width: 32px; height: 17px; border: 3px solid #f7f9fc; border-radius: 0; background: #536b9c; }
.robot--helper .robot__foot { background: #f08b21; }
.robot__foot--left { left: 49px; }
.robot__foot--right { right: 49px; }
.robot__message { width: fit-content; max-width: 100%; min-height: 42px; margin: 0 auto; padding: 9px 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; color: var(--robot-ink); font-weight: 700; }
.robot__controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.robot__controls .button { padding: 9px 13px; background: #f2f5f9; box-shadow: 0 2px 0 #dce3ec; color: #405575; font-size: .9rem; }
.robot[data-expression="curious"] .robot__eye { transform: translateY(-3px); }
.robot[data-expression="excited"] .robot__eye { transform: scale(1.12); }
.robot[data-animation="wave"] .robot__arm--right { animation: robot-wave .95s ease-in-out 3; }
.robot[data-animation="think"] .robot__art { animation: robot-think 2.2s ease-in-out infinite; }
.robot[data-animation="think"] .robot__head { animation: robot-head-tilt 2.2s ease-in-out infinite; transform-origin: 50% 80%; }
.robot[data-animation="think"] .robot__arm--left { animation: robot-think-left 2.2s ease-in-out infinite; }
.robot[data-animation="think"] .robot__arm--right { animation: robot-think-right 2.2s ease-in-out infinite; }
.robot[data-animation="think"] .robot__eye { transform: translateY(-3px); }
.robot[data-animation="think"] .robot__mouth { width: 27px; left: 62px; border-bottom-width: 4px; }
.robot[data-animation="celebrate"] .robot__art { animation: robot-hop .55s ease-in-out 2; }
.robot[data-animation="celebrate"] .robot__arm--left { animation: robot-celebrate-left .55s ease-in-out 2; }
.robot[data-animation="celebrate"] .robot__arm--right { animation: robot-celebrate-right .55s ease-in-out 2; }
@keyframes robot-idle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes robot-think { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(.5deg); } }
@keyframes robot-wave { 0%, 100% { transform: rotate(-12deg); } 20%, 60% { transform: rotate(-142deg); } 40%, 80% { transform: rotate(-112deg); } }
@keyframes robot-hop { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-8px) scale(1.01); } }
@keyframes robot-head-tilt { 0%, 80%, 100% { transform: rotate(0); } 25%, 65% { transform: rotate(5deg); } }
@keyframes robot-think-left { 0%, 80%, 100% { transform: rotate(12deg); } 30%, 65% { transform: rotate(-140deg); } }
@keyframes robot-think-right { 0%, 80%, 100% { transform: rotate(-12deg); } 30%, 65% { transform: rotate(140deg); } }
@keyframes robot-celebrate-left { 0%, 100% { transform: rotate(12deg); } 50% { transform: rotate(148deg); } }
@keyframes robot-celebrate-right { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(-148deg); } }
@media (max-width: 560px) { .robot-pair { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .robot__art, .robot[data-animation] .robot__art, .robot[data-animation] .robot__head, .robot[data-animation] .robot__arm { animation: none !important; transition: none !important; }
}
