body {
  padding: 24px;
}

#app {
  min-height: calc(100vh - 48px);
}

.start-screen,
.game-shell {
  min-height: inherit;
  display: grid;
  place-items: center;
}

.start-card,
.game-stage {
  width: min(1200px, 100%);
}

.game-stage {
  position: relative;
}

.game-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.5fr repeat(3, minmax(120px, 0.75fr));
  gap: 18px;
  align-items: stretch;
}

.reference-panel,
.canvas-panel,
.options-panel {
  min-height: 220px;
}

.overlay-root {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.overlay-root > * {
  pointer-events: auto;
}

@media (max-width: 900px) {
  .game-grid {
    grid-template-columns: 1fr 1fr;
  }

  .reference-panel,
  .canvas-panel {
    min-height: 240px;
  }

  .options-panel {
    min-height: 160px;
  }
}

@media (max-width: 600px) {
  body {
    padding: 14px;
  }

  #app {
    min-height: calc(100vh - 28px);
  }

  .game-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .options-panel {
    min-height: 140px;
  }
}
