* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'DotGothic16', sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game-container {
  position: relative;
  width: 1280px;
  height: 720px;
  overflow: hidden;
  background: #000;
  transform-origin: top left;
  touch-action: manipulation;
}

#game-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 720px;
  display: block;
  image-rendering: pixelated;
}

#ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 720px;
  pointer-events: none;
}

#ui-overlay > * {
  pointer-events: auto;
}

/* ローディング画面 */
#loading-screen {
  position: absolute;
  inset: 0;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

#loading-content {
  text-align: center;
  color: #fff;
}

#loading-title {
  font-size: 48px;
  font-weight: bold;
  letter-spacing: 8px;
  margin-bottom: 40px;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255,215,0,0.5);
}

#loading-bar-wrap {
  width: 400px;
  height: 16px;
  background: #333;
  border: 2px solid #666;
  border-radius: 8px;
  overflow: hidden;
  margin: 0 auto 16px;
}

#loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffd700, #ff8c00);
  border-radius: 6px;
  transition: width 0.1s ease;
}

#loading-text {
  font-size: 14px;
  color: #aaa;
  letter-spacing: 2px;
}

/* ── タッチコントロール（スマホ探索シーン用） ── */
#touch-controls {
  position: absolute;
  bottom: 16px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 20px;
  pointer-events: none;
  z-index: 50;
}

#touch-left-group {
  display: flex;
  gap: 12px;
}

.touch-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

#touch-jump {
  width: 90px;
  height: 90px;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;
  border-color: rgba(255,220,0,0.6);
  background: rgba(60,40,0,0.5);
  color: #ffd700;
}

/* PCでは非表示 */
@media (hover: hover) and (pointer: fine) {
  #touch-controls {
    display: none !important;
  }
}
