:root {
  --paper: #fbf3e4;
  --ink: #4a3b2a;
  --dusk: #2b2438;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #241d2e;
  color: var(--paper);
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
}

/* 画布满铺整个视口：逻辑宽高比按 innerWidth/innerHeight 算，
   FIT 之后正好等于容器大小，不再有上下黑边。
   刘海/圆角设备的安全区由 layout.js 读 env() 后只作用于 HUD，不参与缩放。 */
#game-root {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  touch-action: none;
  overflow: hidden;
  cursor: default;
  background:
    radial-gradient(120% 90% at 50% 18%, #5d4c7c 0%, #3c3350 45%, #241d2e 100%);
}

#game-root canvas {
  display: block;
  touch-action: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

/* 资源就绪前的占位 */
#boot-note {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  transform: translate(-50%, -50%);
  font-size: 15px;
  letter-spacing: 4px;
  color: rgba(255, 236, 205, 0.75);
  opacity: 1;
  transition: opacity 500ms ease;
  pointer-events: none;
}

noscript {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 15px;
  color: #ffeccd;
}

/* Phaser 的 DOM 容器（昵称输入框）需要能被点 */
#game-root > div {
  pointer-events: none;
}

#game-root > div > div,
#game-root > div input {
  pointer-events: auto;
}

input#neko-name::placeholder {
  color: #a89880;
}
