/* Keep the application workspace anchored to the top of the viewport. */
.workspace {
  margin: 0 auto;
  align-self: stretch;
}

/* Use the supplied MMG MEDIA artwork as the complete sidebar brand. */
.app > aside {
  position: relative;
  top: 0;
  height: 100vh;
  align-self: start;
  overflow: hidden;
}

/* Desktop: keep the navigation anchored while only the workspace scrolls. */
@media (min-width: 901px) {
  .app > aside {
    position: fixed;
    z-index: 20;
    inset: 0 auto 0 0;
    width: 224px;
    height: 100vh;
  }

  .app > .workspace {
    grid-column: 2;
  }
}

.sidebar-brand {
  width: 100%;
  height: 80px;
  flex: 0 0 80px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: transparent;
}

.sidebar-brand img {
  width: 112px;
  height: 64px;
  display: block;
  object-fit: cover;
  object-position: center;
}

.app > aside > nav {
  margin-top: 8px;
}

/* Multi-frame mascot: eye interaction, jump, then two sales encouragements. */
.site-pet {
  position: absolute;
  z-index: 2;
  left: 22px;
  bottom: 112px;
  width: 100px;
  height: 100px;
  transform-origin: 50% 90%;
  pointer-events: none;
}

.site-pet picture,
.site-pet img {
  width: 100%;
  height: 100%;
  display: block;
}

.site-pet img {
  object-fit: contain;
  filter: drop-shadow(0 12px 10px #54240e2b);
}

.site-pet-speech {
  position: absolute;
  z-index: 3;
  left: 64px;
  bottom: 88px;
  width: 118px;
  padding: 7px 9px;
  border: 1px solid #f5c69f;
  border-radius: 13px 13px 13px 3px;
  background: #fff8f2;
  box-shadow: 0 7px 20px #6b2c0b14;
  color: #c64d1d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  transform: translate3d(0, 8px, 0) scale(.88);
  transform-origin: 0 100%;
  transition: opacity .22s ease, transform .34s cubic-bezier(.2, .9, .3, 1.3);
}

.site-pet-speech {
  animation-duration: 14.56s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: opacity, transform;
}

.site-pet-speech.greeting-one {
  animation-name: pet-greeting-one;
}

.site-pet-speech.greeting-two {
  animation-name: pet-greeting-two;
}

@keyframes pet-greeting-one {
  0%, 17.9%, 28.8%, 100% {
    opacity: 0;
    transform: translate3d(0, 8px, 0) scale(.88);
  }
  18.4%, 28.3% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes pet-greeting-two {
  0%, 27.8%, 38.7%, 100% {
    opacity: 0;
    transform: translate3d(0, 8px, 0) scale(.88);
  }
  28.3%, 38.2% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@media (max-height: 760px) {
  .sidebar-brand {
    height: 72px;
    flex-basis: 72px;
  }

  .site-pet {
    bottom: 106px;
    width: 86px;
    height: 86px;
  }

  .site-pet-speech {
    left: 56px;
    bottom: 76px;
    width: 112px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-pet-speech {
    display: none;
    animation: none;
  }
}
