.play-intro { text-align: center; padding-bottom: 1rem; }
.play-intro h1 { font-size: clamp(1.8rem, 5vw, 2.75rem); }
.play-intro__lead { max-width: 38em; margin-left: auto; margin-right: auto; }

.play-area { max-width: 900px; margin: 0 auto; }

/* ---- picker ---- */
.game-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.game-card {
  text-align: left;
  background: #10162663;
  border: 1px solid #1a2033;
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.game-card:hover { border-color: #6c5ce780; }
.game-card__badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #00d4ff;
  border: 1px solid #00d4ff4d;
  border-radius: 999px;
  padding: 0.2em 0.7em;
  margin-bottom: 0.75em;
}
.game-card h3 { margin: 0 0 0.35em; font-size: 1.15rem; }
.game-card p { margin: 0; font-size: 0.9rem; }

/* ---- stage ---- */
.game-stage__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.game-hud {
  display: flex;
  gap: 1.25rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
}
.game-hud span { color: #6b7386; font-family: 'Inter', sans-serif; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; margin-right: 0.4em; }
.game-hud strong { color: #e8ecf4; }

.game-canvas-wrap {
  position: relative;
  background: #05070c;
  border: 1px solid #1a2033;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  justify-content: center;
}
#gameCanvas {
  display: block;
  width: 100%;
  height: auto;
  max-width: 480px;
  image-rendering: pixelated;
}

.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 23, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  padding: 1.5rem;
}
.game-overlay[hidden] {
  display: none;
}
.game-overlay h3 { margin: 0; font-size: 1.4rem; }
.game-overlay p { margin: 0; color: #aab2c5; }

/* ---- on-screen controls ---- */
.game-controls {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.game-controls:empty { display: none; }
.ctrl-btn {
  min-width: 3rem;
  min-height: 3rem;
  border-radius: 12px;
  background: #10162663;
  border: 1px solid #1a2033;
  color: #e8ecf4;
  font-size: 1.1rem;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}
.ctrl-btn:active { border-color: #6c5ce7; background: #6c5ce71a; }
.ctrl-dpad {
  display: grid;
  grid-template-columns: repeat(3, 3rem);
  grid-template-rows: repeat(3, 3rem);
  gap: 0.5rem;
  justify-content: center;
}
.ctrl-dpad .ctrl-btn--up    { grid-column: 2; grid-row: 1; }
.ctrl-dpad .ctrl-btn--left  { grid-column: 1; grid-row: 2; }
.ctrl-dpad .ctrl-btn--right { grid-column: 3; grid-row: 2; }
.ctrl-dpad .ctrl-btn--down  { grid-column: 2; grid-row: 3; }

.game-hint {
  text-align: center;
  font-size: 0.8rem;
  color: #6b7386;
  margin-top: 1rem;
}
@media (pointer: coarse) {
  .game-hint { display: none; }
}

/* ---- Stackfall canvas shrink ---- */
#gameCanvas.sf-canvas-active {
  width: 75%;
  max-width: 360px;
}

/* ---- Stackfall three-zone controls ---- */
.sf-controls {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 480px;
  gap: 0.5rem;
}
.sf-zone { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.sf-zone--left   { flex: 1; align-items: flex-start; }
.sf-zone--center { flex: 0 0 auto; }
.sf-zone--right  { flex: 1; align-items: center; gap: 0.75rem; }
.sf-dir-row { display: flex; gap: 0.5rem; }
.ctrl-btn--drop {
  min-width: 2.25rem;
  min-height: 2.25rem;
  font-size: 1.1rem;
  background: rgba(108, 92, 231, 0.12);
  border-color: rgba(108, 92, 231, 0.5);
}
.ctrl-btn--sf-rotate {
  background: rgba(76, 212, 160, 0.12);
  border-color: rgba(76, 212, 160, 0.5);
}
.ctrl-btn--sf-dir {
  background: rgba(200, 149, 42, 0.12);
  border-color: rgba(200, 149, 42, 0.5);
}
.ctrl-btn--sf-dir-wide { min-width: 6rem; }

/* ---- StarLeap two-zone controls ---- */
.sl-controls {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 480px;
  gap: 1rem;
}
.sl-zone { display: flex; align-items: center; gap: 0.5rem; }
.sl-zone--left  { flex: 1; }
.sl-zone--right { flex: 1; justify-content: flex-end; }
.ctrl-btn--jump {
  min-width: 4rem;
  min-height: 4rem;
  font-size: 1.3rem;
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.4);
}
.ctrl-btn--dir { min-width: 5rem; min-height: 3.5rem; }

/* ---- Snake D-pad — bigger buttons ---- */
.ctrl-btn--dpad { min-width: 3.75rem; min-height: 3.75rem; font-size: 1.2rem; }
.ctrl-dpad {
  grid-template-columns: repeat(3, 3.75rem);
  grid-template-rows: repeat(3, 3.75rem);
}
