body {
  background: #222;
  color: #fff;
  font-family: "Segoe UI", sans-serif;
  display: flex;
  justify-content: center;
  padding: 20px;
}

#gameContainer {
  position: relative;
  width: 320px;
}

/* 深さ表示 */
#depthDisplay {
  position: absolute;
  top: -10px;
  left: 0;
  padding: 4px 8px;
  background: rgba(0,0,0,0.6);
  border-radius: 4px;
  font-size: 14px;
}

/* 地形モードバナー */
#terrainBanner {
  position: absolute;
  top: -40px;
  left: 0;
  width: 320px;
  text-align: center;
  font-size: 18px;
  padding: 6px 0;
  background: linear-gradient(90deg, #ffcc00, #ffaa00);
  border-radius: 4px;
  display: none;
  animation: bannerFade 1s ease-out;
}

@keyframes bannerFade {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ペンギン吹き出し */
#speech {
  position: absolute;
  left: 10px;
  top: 60px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.9);
  color: #000;
  border-radius: 6px;
  font-size: 14px;
  display: none;
  animation: speechFade 0.3s ease-out;
}

@keyframes speechFade {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

/* ログパネル */
#logPanel {
  margin-top: 10px;
  background: rgba(0,0,0,0.5);
  border: 1px solid #555;
  border-radius: 6px;
  padding: 6px;
  height: 120px;
  overflow-y: auto;
}

#logTitle {
  font-weight: bold;
  margin-bottom: 4px;
}

#log {
  font-size: 12px;
  line-height: 1.3;
}

/* 情報パネル */
#infoPanel {
  margin-top: 10px;
}

details {
  background: rgba(255,255,255,0.1);
  padding: 6px;
  border-radius: 6px;
  margin-bottom: 6px;
}

summary {
  cursor: pointer;
  font-weight: bold;
}

ul {
  padding-left: 20px;
  margin: 4px 0;
}

#shop {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shopBtn {
  padding: 6px;
  background: #444;
  color: #fff;
  border: 1px solid #666;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.2s;
}

.shopBtn:hover {
  background: #666;
}

@media (max-width: 480px) {
  #gameContainer {
    transform: scale(0.9);
    transform-origin: top left;
  }
}