/* Kill every browser gesture (double-tap zoom, pinch zoom, scroll
   bounce). The page IS the game — there's nothing to scroll or zoom. */
html, body {
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  overscroll-behavior: none;
  overflow: hidden;
}

/* Show one set of instructions per device class. */
.mobile-only { display: none; }
body.is-mobile .desktop-only { display: none; }
body.is-mobile .mobile-only  { display: revert; }

/* ─── Virtual D-pad (mobile only) ─────────────────────────────── */
.dpad {
  position: fixed;
  left: 16px;
  bottom: 16px;
  width: 140px;
  height: 140px;
  z-index: 50;
  touch-action: none;
  user-select: none;
}
body:not(.is-mobile) .dpad { display: none; }

.dpad__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(192, 192, 192, 0.30);
  border: 2px solid rgba(0, 0, 0, 0.5);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.5),
    inset -1px -1px 0 rgba(0, 0, 0, 0.4);
}
.dpad__arrow {
  position: absolute;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.55);
  font-weight: bold;
  font-family: monospace;
  pointer-events: none;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4);
}
.dpad__arrow--up    { top: 6px;    left: 50%; transform: translateX(-50%); }
.dpad__arrow--down  { bottom: 6px; left: 50%; transform: translateX(-50%); }
.dpad__arrow--left  { left: 6px;   top: 50%;  transform: translateY(-50%); }
.dpad__arrow--right { right: 6px;  top: 50%;  transform: translateY(-50%); }

/* ─── Jump button (mobile only — visual hint; tap-to-jump anywhere
       outside the D-pad already works) ──────────────────────────── */
.jumpbtn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 110px;
  height: 110px;
  z-index: 50;
  touch-action: none;
  user-select: none;
  pointer-events: none; /* taps fall through to the document jump handler */
}
body:not(.is-mobile) .jumpbtn { display: none; }

.jumpbtn__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(192, 192, 192, 0.30);
  border: 2px solid rgba(0, 0, 0, 0.5);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.5),
    inset -1px -1px 0 rgba(0, 0, 0, 0.4);
}
.jumpbtn__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
  font-size: 14px;
  font-weight: bold;
  color: rgba(0, 0, 0, 0.6);
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4);
  letter-spacing: 1px;
}

/* ─── Portrait blocker (mobile + portrait only) ─────────────── */
.portrait-block {
  display: none;
  position: fixed;
  inset: 0;
  background: #008080;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.portrait-block__win {
  width: min(320px, 90vw);
}
.portrait-block__body {
  text-align: center;
  padding: 18px;
}
.portrait-block__icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 10px;
}
.portrait-block p { margin: 0; font-size: 12px; }

@media (orientation: portrait) {
  body.is-mobile .portrait-block { display: flex; }
}
