/* METEOR DODGE — meteor-dodge.css（ゲーム固有 UI。LB は arcade-leaderboard.css） */

.meteor-game {
  width: 100%;
  max-width: 56.25rem;
  margin-inline: auto;
  box-sizing: border-box;
}

.meteor-game__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--arcade-line);
  background: var(--arcade-bg);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

@media (max-width: 639px) {
  .meteor-game__frame {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
  }
}

.meteor-game__frame canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: manipulation;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* プレイ中のみ canvas 上のスクロール／ピンチを抑止 */
.meteor-game.is-playing .meteor-game__frame,
.meteor-game.is-playing .meteor-game__frame canvas {
  touch-action: none;
}

.meteor-game__start {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 3;
  width: min(90%, 22rem);
}

.meteor-game__start.hide {
  display: none;
}

.meteor-game__start .arcade-lb__btn {
  font-size: clamp(14px, 3.2vw, 16px);
  letter-spacing: 0.08em;
  padding: 12px 24px;
}

.meteor-game__start-hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--arcade-muted);
  line-height: 1.55;
  letter-spacing: 0.04em;
}

.meteor-game__overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(13, 16, 36, 0.85);
  z-index: 2;
}

.meteor-game__overlay.is-open {
  display: flex;
}

.meteor-game__panel {
  width: min(340px, 88%);
  max-height: 92%;
  overflow-y: auto;
  text-align: center;
  color: var(--arcade-text);
  padding: 12px;
}

.meteor-game__panel h2 {
  font-size: clamp(16px, 3.5vw, 22px);
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: 0.08em;
}

.meteor-game__panel .meteor-game__score {
  font-size: clamp(13px, 2.6vw, 16px);
  color: var(--arcade-muted);
  margin: 0 0 12px;
}

.meteor-game__entry {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 10px;
}

.meteor-game__entry input {
  flex: 1;
  min-width: 0;
  max-width: 180px;
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid var(--arcade-line);
  background: var(--arcade-panel);
  color: var(--arcade-text);
  outline: none;
}

.meteor-game__entry input:focus {
  border-color: var(--arcade-accent);
}

.meteor-game__panel > .arcade-lb__btn--ghost {
  margin: 4px 0 10px;
}
