.welcome-figure {
  position: relative;
  width: min(100%, 25rem);
  aspect-ratio: 3 / 2;
}

.welcome-figure[data-waving="true"] #welcome-still { opacity: 0; }

.welcome-figure .welcome-wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#welcome-motion {
  position: absolute;
  top: calc(100% - .75rem);
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 34px;
  padding: .25rem .65rem;
  border: 1px solid #aec8c6;
  border-radius: 2rem;
  color: #2e514f;
  background: #f7fcfc;
  font: 750 .8rem/1 Nunito, sans-serif;
  cursor: pointer;
}

#welcome-motion::before {
  content: "";
  width: .65rem;
  height: .67rem;
  background: currentColor;
  clip-path: polygon(8% 0, 100% 50%, 8% 100%);
}

#welcome-motion[data-action="pause"]::before {
  clip-path: polygon(0 0, 34% 0, 34% 100%, 66% 100%, 66% 0, 100% 0, 100% 100%, 0 100%);
}

.welcome-bubble {
  position: absolute;
  z-index: 1;
  right: 0;
  top: -.85rem;
  padding: .3rem .75rem;
  border: 1px solid #bcb4d5;
  border-radius: 1rem 1rem 1rem .25rem;
  background: #fffdf8;
  color: #514376;
  font: 800 .96rem/1.25 Nunito, sans-serif;
  opacity: 0;
  pointer-events: none;
}

@keyframes welcome-question {
  0%, 8%, 39%, 100% { opacity: 0; }
  12%, 34% { opacity: 1; }
}

@media (max-width: 600px) {
  .welcome-bubble { top: -1rem; padding: .2rem .55rem; font-size: .78rem; }
}

@media (min-width: 381px) and (prefers-reduced-motion: no-preference) {
  .welcome-figure[data-waving="true"] .welcome-bubble {
    animation: welcome-question 12s ease-in-out infinite;
  }
  .welcome-figure[data-waving="true"] .question { animation-delay: 6s; }
}

.lesson-preview .preview-description .learn-gallery-link {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: .85rem;
  padding: .7rem .9rem .7rem .7rem;
  margin-top: 1rem;
  border: 1px solid #bad4c5;
  border-radius: 1rem;
  background: #fffdf6;
  text-decoration: none;
  line-height: 1.25;
}

.learn-gallery-link:hover > span:last-child,
.learn-gallery-link:focus-visible > span:last-child {
  text-decoration: underline;
  text-underline-offset: .18em;
}

.learn-mini-screens {
  display: flex;
  align-items: center;
  flex: none;
  padding-inline: .15rem;
}

.learn-mini-screens img {
  width: clamp(2rem, 3.4vw, 2.75rem);
  height: auto;
  border: 1px solid #fffdf6;
  border-radius: .3rem;
}

.learn-mini-screens img + img { margin-left: -.45rem; }
.learn-mini-screens img:first-child { transform: rotate(-6deg); }
.learn-mini-screens img:nth-child(2) { z-index: 1; transform: translateY(-.16rem); }
.learn-mini-screens img:last-child { transform: rotate(6deg); }

.kreebo-mission {
  padding-block: clamp(2rem, 4.5vw, 3.8rem);
  border-top: 1px solid #eee1c2;
  background: #faf0d9;
}

.mission-layout {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.35fr);
  align-items: start;
  gap: clamp(1.4rem, 4vw, 3.6rem);
  padding-inline: clamp(0rem, 3.25vw, 2.9rem);
}

.mission-layout h2 {
  max-width: 13ch;
  font-size: clamp(2rem, 3.7vw, 3.35rem);
  line-height: 1.06;
  color: #58402e;
}

.mission-layout p {
  max-width: 56ch;
  color: #463d38;
  font-size: clamp(1rem, 1.5vw, 1.14rem);
}

.mission-layout p + p { margin-top: .65rem; }

.mission-layout a {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  min-height: 44px;
  margin-top: .4rem;
  color: #69401f;
  font-weight: 800;
}

@media (max-width: 720px) {
  .mission-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-inline: .25rem; }
  .mission-layout h2 { max-width: none; }
}
