/* Gameficate cartridge — Touch devices and the "turn your device" screen.
   Phones, tablets and computers all show the same 1920×1080 stage, scaled as one piece to fit the screen (the same
   way the game canvas is scaled), so a template looks exactly alike everywhere. Touch only changes how things react to
   a finger (no hover, no page zoom or bounce), never their size or place. */
/* ---------- Touch devices ---------- */
body.touch {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
}
body.touch .coords {
  display: none;
} /* no pointer to follow on a touch screen */
body.touch #qpanel {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
/* Portrait phones and tablets: ask the player to turn the device. */
#rotate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  background: var(--frame);
  color: #fff;
  text-align: center;
  font-family: var(--font);
}
#rotate .ph {
  width: 64px;
  height: 104px;
  border: 5px solid #fff;
  border-radius: calc(14px * var(--rs, 1));
  position: relative;
  animation: rot 2.2s ease-in-out infinite;
}
#rotate .ph::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 14px;
  height: 4px;
  margin-left: -7px;
  border-radius: calc(2px * var(--rs, 1));
  background: var(--card);
}
#rotate b {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
}
#rotate span {
  font-size: 16px;
  font-weight: 700;
  opacity: 0.8;
  max-width: 320px;
}
@keyframes rot {
  0%,
  25% {
    transform: rotate(0);
  }
  55%,
  80% {
    transform: rotate(-90deg);
  }
  100% {
    transform: rotate(0);
  }
}
@media (orientation: portrait) {
  body.touch #rotate {
    display: flex;
  }
}
