.menu-screen {
  height: 100dvh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-top) + 16px) calc(var(--safe-right) + 20px)
    calc(var(--safe-bottom) + 16px) calc(var(--safe-left) + 20px);
  background: radial-gradient(circle at 20% 10%, var(--color-bg-alt), var(--color-bg) 60%);
  overflow: hidden;
}

.menu-header {
  text-align: center;
  flex-shrink: 0;
  margin-bottom: clamp(8px, 2vh, 24px);
}

.menu-title {
  font-size: clamp(28px, 5vw, 48px);
  margin: 0;
  color: var(--color-primary-dark);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.6);
}

.menu-subtitle {
  font-size: clamp(14px, 2.2vw, 20px);
  color: var(--color-text);
  margin: 4px 0 0;
  opacity: 0.75;
}

.game-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: clamp(10px, 2vw, 22px);
}

/* iPhone (tall, narrow, portrait) - stack into 2 columns x 4 rows */
@media (max-aspect-ratio: 4/5) {
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }
}

/* Very narrow / short fallback: allow scrolling instead of squishing cards unreadably small */
@media (max-height: 480px) {
  .game-grid {
    overflow-y: auto;
  }
}

.game-card {
  list-style: none;
}

.game-card button {
  width: 100%;
  height: 100%;
  min-height: var(--touch-target-min);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-lg);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 0 var(--color-card-shadow), 0 10px 18px rgba(0, 0, 0, 0.12);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  padding: 8px;
}

.game-card button:active {
  transform: translateY(6px);
  box-shadow: 0 2px 0 var(--color-card-shadow), 0 4px 10px rgba(0, 0, 0, 0.12);
}

.game-card .game-emoji {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1;
  pointer-events: none;
}

.game-card .game-label {
  font-size: clamp(13px, 1.8vw, 20px);
  text-align: center;
  pointer-events: none;
}

/* Per-game accent colors, assigned via data-color in js/app.js */
.game-card button[data-color="orange"] { background: var(--color-primary); }
.game-card button[data-color="blue"] { background: var(--color-secondary); }
.game-card button[data-color="green"] { background: var(--color-success); }
.game-card button[data-color="purple"] { background: var(--shape-purple); }
.game-card button[data-color="pink"] { background: #ff7aa8; }
.game-card button[data-color="teal"] { background: #38b2ac; }
.game-card button[data-color="yellow"] { background: var(--shape-yellow); color: #6b4e00; }
.game-card button[data-color="red"] { background: var(--shape-red); }
