:root{
  --bg:#0b1221;
  --panel:#0f1724;
  --accent:#00d1ff;
  --muted:#9aa7b2;
  --text:#e6f3ff;
}

*{box-sizing:border-box}

/* bodyの高さ指定を「最小高さ」に変更（コンテンツが増えた時に切れないようにするため） */
html,body{min-height:100%;margin:0;font-family:Inter,ui-sans-serif,system-ui,Segoe UI,Roboto,"Helvetica Neue",Arial}

body{
  display: block; /* flexを解除して自然な流れにする */
  flex-direction: column; /* 縦方向に並べる */
  align-items:center;
  justify-content: flex-start; /* 上から順に並べる */
  background:linear-gradient(180deg, #071025 0%, #081426 100%);
  color:var(--text);
  padding:40px 20px; /* 上下の余白を少し増やす */
  min-height: 100vh;
}

.container {
  width: 800px; /* ゲームの横幅に合わせる */
  max-width: 95%;
  margin: 0 auto; /* 左右中央寄せ */
  text-align: center;
}

h1{margin:0 0 24px;font-weight:600;color:var(--accent)} /* 下の余白を微増 */

canvas{
  display:block;
  margin: 0 auto;
  /* 比率を守るための設定 */
  max-width: 800px; /* ここが重要：これ以上大きくしない */
  background: #061021;
  /* background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); */
  border:2px solid rgba(255,255,255,0.04);
  box-shadow:0 8px 30px rgba(2,6,23,0.6);
  border-radius:6px;
  max-width: 100%; /* スマホではみ出さないように補正 */
  height: auto;
}

.hint{
  color:var(--muted);
  margin:20px 0 0; /* 余白を調整 */
  font-size:14px;
  line-height: 1.6;
}

/* ゲーム画面を囲むラッパー */
.game-wrapper {
  position: relative;
  display: inline-block;
  margin: 0 auto;
}

/* サウンドボタンの基本デザイン */
.sound-btn {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(15, 23, 36, 0.8);
  border: 2px solid var(--accent);
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  overflow: hidden;
  outline: none;
  z-index: 10; /* 他の要素より手前に */
}

.sound-btn:hover {
  background: var(--accent);
  transform: scale(1.1);
}

/* ミュート状態の斜線エフェクト */
.sound-btn.muted .slash {
  position: absolute;
  width: 100%;
  height: 3px;
  background: #ff4757;
  transform: rotate(45deg);
  box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.sound-btn.muted {
  border-color: #ff4757;
  opacity: 0.7;
}

/* 音声ステータス表示 */
#voice-status {
  position: absolute;
  left: 20px;
  bottom: 20px;
  color: var(--accent);
  font-size: 14px;
  font-family: monospace;
  pointer-events: none;
  text-shadow: 0 0 5px rgba(0,0,0,0.5);
  z-index: 10;
}

/* 補正箇所：追加した「解説文」と「フッター」用のスタイル（見た目を壊さないように馴染ませました） */
.description {
  margin-top: 60px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.description h2, .description h3 {
  color: var(--accent);
}

footer {
  margin-top: 40px;
  padding-bottom: 40px;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--accent);
}