/* The page around Mr. Pepe. Ebitengine adds the game's canvas to <body>
   and sizes it to the window; the game draws its own letterboxing. */

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

canvas {
  touch-action: none;
}

/* The loading screen: the app icon on white, in the colors of the game's
   buttons. Shown while the game downloads. */
.loading {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: #fff;
  color: #222;
  font: 600 16px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: center;
  transition: opacity 0.3s;
}

.loading.done {
  opacity: 0;
  pointer-events: none;
}

.icon {
  width: min(120px, 30vh);
  height: auto;
  border-radius: 22%;
}

.progress {
  width: min(70vw, 320px);
  height: 6px;
  border-radius: 3px;
  background: #fde0cc;
  overflow: hidden;
}

.bar {
  width: 0;
  height: 100%;
  background: #e86100; /* the game's START button */
  transition: width 0.15s linear;
}

.message {
  margin: 0;
}

.loading.error .progress {
  display: none;
}

.retry {
  padding: 10px 24px;
  border: 0;
  border-radius: 6px;
  background: #e86100;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.retry:focus-visible {
  outline: 3px solid #222;
  outline-offset: 2px;
}

/* The game is landscape-only, as on iOS. Upright phones still get it,
   letterboxed, with this hint underneath. It doesn't take touches. */
.rotate {
  display: none;
}

@media (orientation: portrait) and (pointer: coarse) {
  .rotate {
    display: block;
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 5;
    margin: 0;
    color: #ccc;
    font: 600 15px/1.4 system-ui, -apple-system, sans-serif;
    text-align: center;
    pointer-events: none;
  }
}

/* A translated game draws its words in the page's pixel font (loader.js
   reads the body's font family): the classes of site.css, the faces of
   fonts.css. */
.dot {
  font-family: "DotGothic16", "RA Unifont", sans-serif;
}

.uni {
  font-family: "RA Unifont", sans-serif;
}

.brahmic {
  font-family: var(--brahmic-face), "RA Unifont", sans-serif;
}

.sys {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
