:root {
  --bg: #1b0f2e;
  --ink: #fff;
  --accent: #ffcf3a;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans CJK SC", "Source Han Sans SC", "WenQuanYi Micro Hei", sans-serif;
}

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
  position: fixed;
  inset: 0;
  touch-action: none;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font);
}

#game {
  display: block;
  touch-action: none;
}

#rotate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(20, 8, 40, 0.94);
  color: var(--ink);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}

#rotate p {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 1px;
}

#rotate button {
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 8px 20px;
}

#rotate .phone {
  width: 54px;
  height: 92px;
  border: 5px solid var(--accent);
  border-radius: 12px;
  animation: turn 1.8s ease-in-out infinite;
}

@keyframes turn {
  0%, 20% { transform: rotate(0deg); }
  60%, 100% { transform: rotate(-90deg); }
}

@media (orientation: portrait) and (pointer: coarse) {
  body:not(.portrait-ok) #rotate { display: flex; }
}
