.reward-companion-moment,
.reward-companion-fallback {
  margin: 20px 0;
  border: 1px solid #cfd9b9;
  border-radius: 8px;
  background: #f3f6e8;
  text-align: left;
}

.reward-companion-moment {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  min-height: 154px;
  overflow: hidden;
}

.reward-companion-scene {
  position: relative;
  align-self: stretch;
  min-height: 154px;
  background:
    linear-gradient(#dce9c8 1px, transparent 1px),
    linear-gradient(90deg, #dce9c8 1px, transparent 1px),
    #eaf1d8;
  background-size: 16px 16px;
}

.reward-companion-pet {
  position: absolute;
  left: 5px;
  bottom: 0;
  width: 122px;
  height: 132px;
  display: grid;
  place-items: end center;
}

.reward-companion-pet > .pixel-sprite,
.reward-companion-pet .pixel-sprite {
  width: 118px;
  height: 118px;
  object-fit: contain;
  image-rendering: pixelated;
  animation: rewardPetBob 1.05s 0.25s ease-in-out 2;
}

.reward-companion-pet .sprite-wrap {
  width: 122px;
  height: 122px;
  display: grid;
  place-items: end center;
}

.reward-exp {
  position: absolute;
  z-index: 1;
  display: block;
  width: max-content;
  color: #416a37;
  font-family: var(--display), monospace;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .02em;
  text-shadow: 1px 1px #f8fbea, -1px -1px #f8fbea;
  pointer-events: none;
  opacity: 0;
  animation: rewardExpFloat 1.85s cubic-bezier(.19,.72,.32,1) 2 both;
  animation-play-state: paused;
}

.reward-companion-moment.is-visible .reward-exp { animation-play-state: running; }
.reward-exp-main { right: 3px; top: 55px; animation-delay: .14s; }
.reward-exp-echo { left: 2px; top: 88px; color: #688544; font-size: 9px; animation-delay: .49s; }
.reward-exp-spark { right: 15px; top: 84px; color: #87a548; font-size: 13px; animation-delay: .84s; }

.reward-companion-copy {
  padding: 20px 20px 20px 18px;
}

.reward-companion-copy small,
.reward-companion-fallback small {
  display: block;
  margin-bottom: 7px;
  color: #52633f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.reward-companion-copy h3,
.reward-companion-fallback h3 {
  margin: 0 0 7px;
  color: #334d39;
  font-size: 15px;
  line-height: 1.55;
  word-break: keep-all;
}

.reward-companion-copy p,
.reward-companion-fallback p {
  color: #697862;
  font-size: 11px;
  line-height: 1.7;
}

.reward-companion-fallback {
  padding: 18px 20px;
  border-style: dashed;
  background: #f7f8f2;
}

.reward-share-action {
  width: 100%;
  margin-top: 20px;
  border-color: #98ab76;
  background: #f5f8e9;
  color: #365b42;
  font-weight: 700;
}

@keyframes rewardExpFloat {
  0% { transform: translateY(7px); opacity: 0; }
  18%, 66% { opacity: 1; }
  100% { transform: translateY(-16px); opacity: 0; }
}

@keyframes rewardPetBob {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-4px); }
  65% { transform: translateY(-1px) rotate(-1deg); }
}

@media (max-width: 400px) {
  .reward-companion-moment { grid-template-columns: 120px minmax(0, 1fr); }
  .reward-companion-pet { left: -2px; width: 105px; }
  .reward-companion-pet > .pixel-sprite,
  .reward-companion-pet .pixel-sprite { width: 105px; height: 105px; }
  .reward-exp-main { right: 2px; }
  .reward-exp-echo { left: 1px; }
  .reward-exp-spark { right: 8px; }
  .reward-companion-copy { padding: 16px 14px 16px 10px; }
  .reward-companion-copy h3 { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .reward-companion-pet > .pixel-sprite,
  .reward-companion-pet .pixel-sprite,
  .reward-exp {
    animation: none;
  }

  .reward-exp-main { opacity: 1; }
  .reward-exp-echo,
  .reward-exp-spark { display: none; }
}

