.game-body {
  position: relative;
  width: 100dvw;
  height: 100dvh;
  overflow: hidden;
  background: #0a0e1f;
  touch-action: none;
}

#camera-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

#game-canvas {
  position: fixed;
  inset: 0;
  width: 100dvw;
  height: 100dvh;
  display: block;
  z-index: 1;
}

/* 上部HUD */
.game-hud {
  position: fixed;
  top: 10px;
  left: 16px;
  right: 16px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  pointer-events: none;
}

.hud-left,
.hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.hud-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 22, 46, 0.82);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 800;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
}

.hud-btn:active {
  transform: scale(0.94);
}

.hud-btn.mode-btn {
  border-color: rgba(0, 210, 255, 0.55);
  color: #9beeff;
}

/* スコアボード */
.scoreboard {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(12, 18, 38, 0.88);
  border: 3px solid rgba(255, 255, 255, 0.28);
  border-radius: 22px;
  padding: 6px 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.player-score {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-label {
  font-size: 0.95rem;
  font-weight: 800;
}

.left-player .player-label {
  color: #4ddbff;
}

.right-player .player-label {
  color: #ff6b9d;
}

.score-num {
  font-size: 2.1rem;
  font-weight: 900;
  min-width: 36px;
  text-align: center;
  line-height: 1;
}

.left-player .score-num {
  color: #00e1ff;
  text-shadow: 0 0 12px rgba(0, 225, 255, 0.6);
}

.right-player .score-num {
  color: #ff3e7f;
  text-shadow: 0 0 12px rgba(255, 62, 127, 0.6);
}

.score-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 6px;
}

.target-score-label {
  font-size: 0.7rem;
  color: #ffd166;
  font-weight: 800;
}

.vs-text {
  font-size: 0.95rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.55);
}

/* モーダルオーバーレイ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 14, 30, 0.82);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background: linear-gradient(160deg, rgba(26, 36, 72, 0.96), rgba(15, 20, 44, 0.98));
  border: 3px solid rgba(255, 255, 255, 0.28);
  border-radius: 32px;
  padding: 28px 36px;
  max-width: 680px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.modal-icons {
  font-size: 2.8rem;
  margin-bottom: 8px;
}

.modal-card h1 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #00e1ff, #ffd166, #ff5c93);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.modal-desc {
  font-size: 1.05rem;
  line-height: 1.55;
  color: #dce5ff;
  margin-bottom: 18px;
}

.modal-desc strong {
  color: #ffd166;
}

.hand-guide-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.hand-guide-box {
  border-radius: 20px;
  padding: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.hand-guide-box.left-guide {
  background: rgba(0, 210, 255, 0.14);
  border-color: rgba(0, 210, 255, 0.5);
}

.hand-guide-box.right-guide {
  background: rgba(255, 62, 127, 0.14);
  border-color: rgba(255, 62, 127, 0.5);
}

.guide-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 900;
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.left-guide .guide-badge {
  background: #00b8e6;
  color: #fff;
}

.right-guide .guide-badge {
  background: #ff3e7f;
  color: #fff;
}

.guide-emoji {
  font-size: 2.3rem;
  margin: 4px 0;
}

.guide-text {
  font-size: 0.95rem;
  color: #fff;
}

.guide-text strong {
  color: #ffd166;
}

.loading-status {
  font-size: 0.95rem;
  color: #ffd166;
  background: rgba(255, 209, 102, 0.12);
  border: 1px solid rgba(255, 209, 102, 0.35);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 18px;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.primary-play-btn {
  background: linear-gradient(90deg, #06d6a0 0%, #00b4d8 100%);
  color: #fff;
  border: none;
  border-radius: 18px;
  padding: 14px 36px;
  font-size: 1.35rem;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(6, 214, 160, 0.4);
  transition: transform 0.15s ease, opacity 0.2s;
}

.primary-play-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.primary-play-btn:not(:disabled):active {
  transform: scale(0.95);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 18px;
  padding: 14px 24px;
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.win-trophy {
  font-size: 4rem;
  margin-bottom: 8px;
}

.win-score-text {
  font-size: 2.8rem;
  font-weight: 900;
  color: #ffd166;
  margin: 12px 0 24px;
}
