/* 展示ゲーム共通スタイル (スパイク版)
   仕様: docs/games/exhibition_game_specs.md
   - 指1本操作のため、スクロール・ズーム・長押しメニューを全部殺す */

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  overscroll-behavior: none;
}

body {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
}

canvas {
  display: block;
  position: fixed;
  inset: 0;
  touch-action: none;
}

/* ---- 調整パネル (スパイク専用。本実装では外す) ---- */

#tuner-btn {
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 20px;
  line-height: 44px;
  text-align: center;
  z-index: 10;
  cursor: pointer;
}

/* 初期値と違うつまみがあるときは ⚙ に個数を出す。
   実機で「素の状態のつもりが実は違っていた」を見逃さないため (2026-08-23) */
#tuner-btn.off-default {
  background: rgba(255, 196, 84, 0.34);
  font-size: 15px;
  font-weight: 700;
}

#tuner {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 86vw);
  padding: 56px 16px 24px;
  box-sizing: border-box;
  overflow-y: auto;
  background: rgba(14, 14, 20, 0.94);
  color: #e8e8f0;
  font-size: 13px;
  z-index: 9;
  transform: translateX(101%);
  transition: transform 0.18s ease-out;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

#tuner.open { transform: translateX(0); }

#tuner h2 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #9aa0b5;
}

#tuner .row { margin-bottom: 14px; }

#tuner label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  color: #c8ccdc;
}

#tuner label .val {
  color: #7fd6ff;
  font-variant-numeric: tabular-nums;
}

#tuner input[type="range"] { width: 100%; }

#tuner select {
  width: 100%;
  padding: 6px;
  background: #22222e;
  color: #e8e8f0;
  border: 1px solid #3a3a4a;
  border-radius: 4px;
}

#tuner .check { display: flex; align-items: center; gap: 8px; }

#tuner button.reset {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  background: #33333f;
  color: #e8e8f0;
  border: none;
  border-radius: 6px;
}

#tuner .note {
  margin-top: 16px;
  color: #777d92;
  line-height: 1.6;
}

/* プリセット。押せばその設定で読み直す (実機でつまみを1本ずつ動かすのは続かない) */
#tuner .presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

#tuner .presets button {
  flex: 1 1 auto;
  padding: 9px 10px;
  background: #33333f;
  color: #e8e8f0;
  border: 1px solid #4a4a5c;
  border-radius: 6px;
  font-size: 13px;
}

#tuner .presets button.on {
  background: #4a6ea8;
  border-color: #7ba4e0;
}

/* ---- 3択へ戻る口 (タイトル / リザルトのときだけ出る) ----
   3択のランチャーを付けたので、戻り口が無いと一方通行になる。
   プレイ中は .show が外れて消える = 誤タップでゲームから抜けられない */

#home-btn {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 60px;
  padding: 12px 22px;
  border: 2px solid #fff3bd;
  border-radius: 16px;
  background: #ffd54a;
  color: #241a08;
  box-shadow: 0 4px 0 #a66a12, 0 6px 18px rgba(0, 0, 0, 0.35);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}

#home-btn:hover {
  background: #ffe582;
}

#home-btn:active {
  background: #ffc62e;
  transform: translateY(2px);
  box-shadow: 0 2px 0 #a66a12, 0 3px 10px rgba(0, 0, 0, 0.3);
}

#home-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

#home-btn.show {
  opacity: 1;
  pointer-events: auto;
}
