@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=DotGothic16&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  overscroll-behavior: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body {
  background: #0a0a12;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  overflow: hidden;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#gc {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 9/16;
  max-height: 100dvh;
}

canvas {
  touch-action: none;
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#sp {
  position: absolute;
  top: 16%;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: #fff;
  color: #1a1a2e;
  padding: 8px 18px;
  border-radius: 14px;
  font-size: 15px;
  font-family: 'DotGothic16', sans-serif;
  font-weight: bold;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 4px 24px rgba(255, 215, 0, 0.4);
  border: 2px solid #ffd700;
  transition: transform .18s cubic-bezier(.34, 1.56, .64, 1), opacity .25s;
  opacity: 0;
}

#sp.show {
  transform: translateX(-50%) scale(1);
  opacity: 1
}

#sp::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #fff;
}

#sp::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #ffd700;
  z-index: -1;
}

#install-hint {
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(94vw, 420px);
  background: rgba(10, 14, 22, 0.96);
  border: 1px solid #384155;
  border-radius: 12px;
  color: #e8ecf5;
  font-family: 'DotGothic16', sans-serif;
  font-size: 13px;
  line-height: 1.35;
  padding: 10px 44px 10px 12px;
  z-index: 99;
  pointer-events: auto;
}

#install-hint p {
  margin: 0;
}

#install-hint button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'DotGothic16', sans-serif;
}

#install-hint-action {
  margin-top: 8px;
  padding: 6px 10px;
  background: #ffd700;
  color: #141826;
  font-weight: bold;
}

#install-hint-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: transparent;
  color: #d0d6e0;
  font-size: 18px;
  line-height: 1;
}

.hidden {
  display: none !important;
}
