#map-loading {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: white;
}
.loading-cup {
  position: relative;
  width: clamp(140.8px, 40vmin, 192px);
  aspect-ratio: 1;
  display: grid;
  visibility: hidden;
}
.loading-cup.is-ready { visibility: visible; }
.loading-cup-image {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: auto;
}
.loading-cup-spoon {
  position: absolute;
  inset: 0;
  transform-origin: 46.5% 47%;
  transform: translate(3%, -1.4%) rotate(28deg);
  pointer-events: none;
}
.loading-cup-spoon::before {
  content: "";
  position: absolute;
  left: 46.5%;
  bottom: 53%;
  width: 5.6%;
  height: 30%;
  transform: translateX(-50%);
  clip-path: polygon(27% 0, 73% 0, 93% 5%, 100% 13%, 91% 36%, 68% 58%, 61% 100%,
    39% 100%, 32% 58%, 9% 36%, 0 13%, 7% 5%);
  background: linear-gradient(90deg, #666d77, #b9c1c9 24%, #fafafa 43%, #adb4bd 70%, #646b75);
}
.loading-cup-spoon::after {
  content: "";
  position: absolute;
  top: 46.6%;
  left: 44%;
  width: 5%;
  height: 1.15%;
  border-radius: 50%;
  background: rgb(56 26 8 / 28%);
}
@media (prefers-reduced-motion: no-preference) {
  .loading-cup.is-ready .loading-cup-spoon { animation: stir-coffee 1.65s linear infinite; }
  .loading-cup-image { clip-path: inset(33% 0 0); }
  .loading-cup-steam, .loading-cup::after {
    grid-area: 1 / 1;
    background: url("./loading-cup.webp") center / contain no-repeat;
  }
  .loading-cup::after { content: ""; }
  .loading-cup-steam, .loading-cup::after {
    clip-path: inset(0 0 67%);
    transform-origin: 48% 33%;
  }
  .loading-cup-steam { animation: coffee-steam 1.5s ease-in-out infinite alternate; }
  .loading-cup::after {
    mask-image: linear-gradient(to bottom, black 23%, transparent 33%);
    animation: rising-steam 1.8s ease-out -.6s infinite;
  }
  @keyframes stir-coffee {
    0%, 100% { transform: translate(0, -2.6%) rotate(30deg); }
    12.5% { transform: translate(5.3%, -1.85%) rotate(29deg); }
    25% { transform: translate(7.5%, 0) rotate(24deg); }
    37.5% { transform: translate(5.3%, 1.85%) rotate(18deg); }
    50% { transform: translate(0, 2.6%) rotate(25deg); }
    62.5% { transform: translate(-5.3%, 1.85%) rotate(32deg); }
    75% { transform: translate(-7.5%, 0) rotate(40deg); }
    87.5% { transform: translate(-5.3%, -1.85%) rotate(37deg); }
  }
  @keyframes coffee-steam {
    from { transform: skewX(-9deg) scaleY(.88); }
    to { transform: skewX(10deg) scaleY(1.22); opacity: .75; }
  }
  @keyframes rising-steam {
    from { transform: translate(0, -3%) scale(.8); opacity: 0; }
    28% { opacity: .46; }
    to { transform: translate(6%, -26%) scale(1.12); opacity: 0; }
  }
}
