:root {
  --army-green: #3d4a2a;
  --army-green-dark: #2a331d;
  --sand: #c9b98f;
  --panel: #1c2114;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: #000;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Prevent pull-to-refresh / rubber-banding on mobile browsers. */
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#game {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: 100dvh;
  overflow: hidden;
  margin: 0 !important;
}

#game canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 100%;
}

/* Rotate hint: hidden by default, shown only on narrow portrait viewports. */
#rotate-hint {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--army-green-dark);
  color: var(--sand);
  text-align: center;
  padding: 24px;
}

#rotate-hint .rotate-icon {
  font-size: 64px;
  animation: rotate-wiggle 1.6s ease-in-out infinite;
}

#rotate-hint p {
  font-size: 18px;
  max-width: 300px;
  line-height: 1.4;
}

@keyframes rotate-wiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(90deg);
  }
}

/* Only nag on phone-sized portrait screens, not portrait tablets/desktops. */
@media (orientation: portrait) and (max-width: 820px) {
  #rotate-hint {
    display: flex;
  }
}
