@font-face {
  font-family: BaraeLoadingSans;
  src: url('/assets/fonts/studio-sans.woff') format('woff');
  font-display: swap;
}

#barae-game-loading {
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 24px;
  background: #fff2e5;
  color: #786459;
  text-align: center;
  font: 12px/1.5 BaraeLoadingSans, system-ui, sans-serif;
  touch-action: none;
}

#barae-game-loading .barae-loading-sticker {
  position: relative;
  width: clamp(178px, 44vw, 232px);
  max-width: 100%;
  margin-inline: auto;
}

#barae-game-loading img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

#barae-game-loading .barae-loading-base { opacity: .17; }
#barae-game-loading .barae-loading-fill {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--barae-loading-fill, 0%)) 0 0);
  transition: clip-path 160ms ease-out;
}

#barae-game-loading .barae-loading-caption {
  margin: 14px 0 0;
  color: inherit;
  font: inherit;
  letter-spacing: .025em;
}

@media (prefers-reduced-motion: reduce) {
  #barae-game-loading .barae-loading-fill { transition: none; }
}
